[GRASS-dev] [GRASS GIS] #1765: variable length array error in r.terraflow with clang
GRASS GIS
trac at osgeo.org
Tue Dec 18 11:47:15 PST 2012
#1765: variable length array error in r.terraflow with clang
------------------------+---------------------------------------------------
Reporter: kyngchaos | Owner: grass-dev@…
Type: defect | Status: closed
Priority: normal | Milestone: 6.4.3
Component: Compiling | Version: svn-develbranch6
Resolution: fixed | Keywords: clang
Platform: MacOSX | Cpu: OSX/Intel
------------------------+---------------------------------------------------
Comment(by neteler):
Unfortunately the backport is incompliant with r.terraflow in G6:
{{{[neteler at north r.terraflow]$ make
c++ -c -I/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/include -g
-Wall -DUSER=\"neteler\" -DNODATA_FIX -D_FILE_OFFSET_BITS=64
-DPACKAGE=\""grassmods"\" -DELEV_FLOAT main.cc -o OBJ.x86_64-unknown-
linux-gnu/FLOAT/main.o
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq.h:33:0,
from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:41,
from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:39,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h: In member function ‘AMI_err
em_buffer<T, Key>::substream_merge(AMI_STREAM<T>**, unsigned int,
AMI_STREAM<T>*)’:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:989:3: error: ‘vector’ is not a
member of ‘std’
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:989:16: error: expected primary-
expression before ‘*’ token
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:989:17: error: expected primary-
expression before ‘>’ token
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:989:35: error: there are no
arguments to ‘in_objects’ that depend on a template parameter, so a
declaration of ‘in_objects’ must be available [-fpermissive]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:989:35: note: (if you use
‘-fpermissive’, G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:1018:46: error: ‘in_objects’ was not
declared in this scope
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:1048:43: error: ‘in_objects’ was not
declared in this scope
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:1053:46: error: ‘in_objects’ was not
declared in this scope
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/embuffer.h:1063:15: error: ‘in_objects’ was not
declared in this scope
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:39:0,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h: In member function ‘AMI_err
em_pqueue<T, Key>::merge_buffer(em_buffer<T, Key>*,
AMI_STREAM<ExtendedEltMergeType<T, Key> >*, long int)’:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1250:3: error: ‘vector’ is not a
member of ‘std’
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1250:16: error: expected primary-
expression before ‘*’ token
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1250:17: error: expected primary-
expression before ‘>’ token
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1250:35: error: there are no
arguments to ‘in_objects’ that depend on a template parameter, so a
declaration of ‘in_objects’ must be available [-fpermissive]
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:39:0,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1278:41: error: ‘in_objects’ was
not declared in this scope
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1313:37: error: ‘in_objects’ was
not declared in this scope
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:39:0,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h: In member function ‘AMI_err
em_pqueue<T, Key>::merge_streams(AMI_STREAM<ExtendedEltMergeType<T, Key>
>**, short unsigned int, AMI_STREAM<ExtendedEltMergeType<T, Key> >*, long
int)’:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1375:3: error: ‘vector’ is not a
member of ‘std’
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1375:43: error: expected primary-
expression before ‘>’ token
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1375:61: error: there are no
arguments to ‘in_objects’ that depend on a template parameter, so a
declaration of ‘in_objects’ must be available [-fpermissive]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1399:4: error: ‘in_objects’ was not
declared in this scope
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_impl.h:1427:36: error: ‘in_objects’ was
not declared in this scope
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_adaptive_impl.h:30:0,
from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:41,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_adaptive.h: In constructor
‘EMPQueueAdaptive<T, Key>::EMPQueueAdaptive(long int)’:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/empq_adaptive.h:53:47: warning: delegating
constructors only available with -std=c++11 or -std=gnu++11 [enabled by
default]
main.cc: In function ‘void printMaxSortSize(long int)’:
main.cc:436:43: warning: format ‘%d’ expects argument of type ‘int’, but
argument 4 has type ‘long unsigned int’ [-Wformat]
main.cc:439:83: warning: format ‘%d’ expects argument of type ‘int’, but
argument 4 has type ‘long unsigned int’ [-Wformat]
main.cc: In function ‘int main(int, char**)’:
main.cc:622:16: warning: zero-length gnu_printf format string [-Wformat-
zero-length]
In file included from main.cc:43:0:
grass2str.h: In instantiation of ‘AMI_STREAM<T>* cell2stream(char*,
elevation_type, long int*) [with T = float; elevation_type = float]’:
main.cc:558:25: required from here
grass2str.h:144:3: warning: format ‘%lld’ expects argument of type ‘long
long int’, but argument 5 has type ‘off_t {aka long int}’ [-Wformat]
In file included from /home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami.h:27:0,
from common.h:27,
from main.cc:39:
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h: In instantiation of ‘AMI_err
AMI_STREAM<T>::write_item(const T&) [with T = float]’:
grass2str.h:128:4: required from ‘AMI_STREAM<T>* cell2stream(char*,
elevation_type, long int*) [with T = float; elevation_type = float]’
main.cc:558:25: required from here
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h:583:3: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h: In instantiation of ‘AMI_err
AMI_STREAM<T>::read_item(T**) [with T = short int]’:
grass2str.h:193:4: required from ‘void stream2_CELL(AMI_STREAM<T>*,
dimension_type, dimension_type, char*, bool) [with T = short int;
dimension_type = short int]’
main.cc:575:51: required from here
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h:521:3: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h: In instantiation of ‘AMI_err
AMI_STREAM<T>::read_item(T**) [with T = float]’:
grass2str.h:193:4: required from ‘void stream2_CELL(AMI_STREAM<T>*,
dimension_type, dimension_type, char*, bool) [with T = float;
dimension_type = short int]’
main.cc:580:62: required from here
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h:521:3: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h: In instantiation of ‘AMI_err
AMI_STREAM<T>::read_item(T**) [with T = labelElevType]’:
grass2str.h:274:3: required from ‘void stream2_CELL(AMI_STREAM<T>*,
dimension_type, dimension_type, FUN, char*) [with T = labelElevType; FUN =
labelElevTypePrintLabel; dimension_type = short int]’
main.cc:585:26: required from here
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h:521:3: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h: In instantiation of ‘AMI_err
AMI_STREAM<T>::read_item(T**) [with T = sweepOutput]’:
grass2str.h:448:3: required from ‘void stream2_FCELL(AMI_STREAM<T>*,
dimension_type, dimension_type, FUN1, FUN2, char*, char*) [with T =
sweepOutput; FUN1 = printAccumulation; FUN2 = printTci; dimension_type =
short int]’
main.cc:609:36: required from here
/home/neteler/grass64/dist.x86_64-unknown-linux-
gnu/include/grass/iostream/ami_stream.h:521:3: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
make: *** [OBJ.x86_64-unknown-linux-gnu/FLOAT/main.o] Error 1
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1765#comment:9>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list