[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L
neroden at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 3 20:19:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
------- Additional Comments From neroden at gcc dot gnu dot org 2003-08-03 20:19 -------
Oh-kay. After doing my research, there seem to be the following cases:
1. C Headers which don't know anything about C++. For these, we can safely
define __cplusplus correctly, since the system headers don't care about it.
(Fixincludes does various things to make these C++-ready, as well.)
2. C Headers which know about C++ and do the right thing (Solaris 9, perhaps).
For these, should be able to safely define __cplusplus correctly.
3. C Headers which know about C++ and do the *wrong* thing (Solaris 8 is the
*only* reported version of this sort). Are we holding up the change for these?
It sounds like it!
The headers in category 3 are precisely the sort of thing which fixincludes is
*supposed* to fix. For starters, it wouldn't be very hard to kill off
everything inside their #if __cplusplus >= 199711L clauses using fixincludes
(perhaps by replacing it with #if __DUMMY_BLAH_BLAH_BLAH >= 199711L). If that
converted them to headers which could be used as "regular" C headers, that would
do the trick. If that didn't do the trick, even more aggressive techniques
could be used to eliminate C++-awareness from the headers.
More information about the Gcc-bugs
mailing list