Opened 13 years ago
Closed 13 years ago
#1676 closed defect (fixed)
clang: compile error in ami_stream
Reported by: | kyngchaos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.3 |
Component: | Compiling | Version: | 6.4.2 |
Keywords: | Cc: | ||
CPU: | OSX/Intel | Platform: | MacOSX |
Description
When compiling with clang on OS X, there is a error in ami_stream.h:
In file included from ami_stream.cc:29: /Users/Shared/src/GRASS/grass-6.4.2-snow/dist.i386-apple-darwin11.3.0/include/grass/iostream/ami_stream.h:252:22: error: default arguments cannot be added to an out-of-line definition of a member of a class template AMI_stream_type st = AMI_READ_WRITE_STREAM) { ^ ~~~~~~~~~~~~~~~~~~~~~ /Users/Shared/src/GRASS/grass-6.4.2-snow/dist.i386-apple-darwin11.3.0/include/grass/iostream/ami_stream.h:470:26: error: default arguments cannot be added to an out-of-line definition of a member of a class template ...MM_stream_usage usage_type= MM_STREAM_USAGE_OVERHEAD) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~ /Users/Shared/src/GRASS/grass-6.4.2-snow/dist.i386-apple-darwin11.3.0/include/grass/iostream/ami_stream.h:549:62: error: default arguments cannot be added to an out-of-line definition of a member of a class template AMI_err AMI_STREAM<T>::read_array(T *data, off_t len, off_t *lenp=NULL) { ^ ~~~~
note that gcc/g++ is not included with Xcode as of 4.3, and gcc/g++ are symlinks to clang.
The llvm compiler is still included in Xcode 4.3, and ami_stream compiles when configured with CC=llvm-gcc CXX=llvm-g++.
Change History (4)
follow-up: 2 comment:1 by , 13 years ago
comment:2 by , 13 years ago
Component: | Default → Compiling |
---|
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Replying to kyngchaos:
Fixed in trunk with r52130. Recommend back-port.