Boost with Darwin (Mac) gcc 4.0.1
Hello, I have an issue with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465) it seem to appear with the keyword "check" for example on files : detail/is_dereferencable.hpp detail/is_incrementable.hpp bzip2.hpp I have some compilation like : "error: declaration does not declare anything" wich disappears if i rename the check in both first files to check_ (everywhere in the file) and check_error in the third one... (and of course in the bzip2.cpp file too then) It does not happen on the very same code with gcc-4.3.0 (mingw version) nor vc8.0 does this renaming have possible side effects I have not seen (my code compiles, links, and seems to run with the modification...) Any explainations for this ? regards, Mathieu -- http://www.incub.net/
At 7:46 AM +0200 7/13/08, Mathieu Peyréga wrote:
Hello,
I have an issue with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
it seem to appear with the keyword "check" for example on files :
detail/is_dereferencable.hpp detail/is_incrementable.hpp
bzip2.hpp
I have some compilation like : "error: declaration does not declare anything"
wich disappears if i rename the check in both first files to check_ (everywhere in the file)
and check_error in the third one... (and of course in the bzip2.cpp file too then)
It does not happen on the very same code with gcc-4.3.0 (mingw version) nor vc8.0
does this renaming have possible side effects I have not seen (my code compiles, links, and seems to run with the modification...)
Any explainations for this ?
Are you including
I don't know yet... i'll check when i have a little time... anyway i guess it is a good and possible explanation... and maybe a good reason to change the names in the boost side (of the moon) ;-) what do you think ? regards, Mathieu -- http://www.incub.net/ Marshall Clow a écrit :
At 7:46 AM +0200 7/13/08, Mathieu Peyréga wrote:
Hello,
I have an issue with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
it seem to appear with the keyword "check" for example on files :
detail/is_dereferencable.hpp detail/is_incrementable.hpp
bzip2.hpp
I have some compilation like : "error: declaration does not declare anything"
wich disappears if i rename the check in both first files to check_ (everywhere in the file)
and check_error in the third one... (and of course in the bzip2.cpp file too then)
It does not happen on the very same code with gcc-4.3.0 (mingw version) nor vc8.0
does this renaming have possible side effects I have not seen (my code compiles, links, and seems to run with the modification...)
Any explainations for this ?
Are you including
(directly or indirectly)? It defines macros named "check" and "check_error". The file is located at: /usr/include/AssertMacros.h.
At 9:38 PM +0200 7/13/08, Mathieu Peyréga wrote:
Marshall Clow a écrit :
At 7:46 AM +0200 7/13/08, Mathieu Peyréga wrote:
Hello,
I have an issue with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
it seem to appear with the keyword "check" for example on files :
detail/is_dereferencable.hpp detail/is_incrementable.hpp
bzip2.hpp
I have some compilation like : "error: declaration does not declare anything"
wich disappears if i rename the check in both first files to check_ (everywhere in the file)
and check_error in the third one... (and of course in the bzip2.cpp file too then)
It does not happen on the very same code with gcc-4.3.0 (mingw version) nor vc8.0
does this renaming have possible side effects I have not seen (my code compiles, links, and seems to run with the modification...)
Any explainations for this ?
Are you including
(directly or indirectly)? It defines macros named "check" and "check_error". The file is located at: /usr/include/AssertMacros.h. I don't know yet... i'll check when i have a little time... anyway i guess it is a good and possible explanation... and maybe a good reason to change the names in the boost side (of the moon) ;-) what do you think ?
regards,
Mathieu -- http://www.incub.net/
An easy check is to #define __ASSERTMACROS__ somewhere before you include any files. [ assuming no precompiled headers ] As for changing boost, I'm not the best person to say. It really annoys me that Apple defines those macros; they're useful names, not all caps, and the functionality that they implement makes code (IMSHO) harder to read. My suggestion would be to avoid them (the macros) altogether - by not including that header file. -- -- Marshall Marshall Clow Idio Software mailto:marshall@idio.com It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
An easy check is to #define __ASSERTMACROS__ somewhere before you include any files. [ assuming no precompiled headers ]
As for changing boost, I'm not the best person to say. It really annoys me that Apple defines those macros; they're useful names, not all caps, and the functionality that they implement makes code (IMSHO) harder to read.
My suggestion would be to avoid them (the macros) altogether - by not including that header file.
This is it... i added : #if defined(__ASSERTMACROS__) || defined(check) #error This file define check macro and this is a serious issue... #endif in the 3 files : boost/iostreams/filter/bzip2.hpp boost/iostreams/detail/is_dereferenceable.hpp boost/detail/is_incrementable.hpp juste before the place where code begins... And the #error directive does trigger... So far, as i don't know where this assertion header is included from, I did renamed the "check" and "check_error" on boost side... I'll check soon with Xcode 3.1 released today if it does happen too... Regards, Mathieu -- http://www.incub.net/
on Sun Jul 13 2008, Marshall Clow
At 7:46 AM +0200 7/13/08, Mathieu Peyréga wrote:
Hello,
I have an issue with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
it seem to appear with the keyword "check" for example on files :
detail/is_dereferencable.hpp detail/is_incrementable.hpp
bzip2.hpp
I have some compilation like : "error: declaration does not declare anything"
wich disappears if i rename the check in both first files to check_ (everywhere in the file)
and check_error in the third one... (and of course in the bzip2.cpp file too then)
It does not happen on the very same code with gcc-4.3.0 (mingw version) nor vc8.0
does this renaming have possible side effects I have not seen (my code compiles, links, and seems to run with the modification...)
Any explainations for this ?
Are you including
(directly or indirectly)? It defines macros named "check" and "check_error". The file is located at: /usr/include/AssertMacros.h.
Nasty. -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (3)
-
David Abrahams
-
Marshall Clow
-
Mathieu Peyréga