This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L


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 pme at gcc dot gnu dot org  2003-08-04 04:32 -------
> You missed the point.  I'm not sure we're going to reach anywhere with
> that start.

No, he hasn't missed the point.  The question in comment #11 is a legitimate
one, based on this sequence of reasoning:  Solaris 8 is the only (reported!)
platform with the problem, other bugs are appearing because of g++'s wrong
__cplusplus value, we /could/ fix the problem on Solaris 8 but have chosen
not to.

The question is exactly the point:  "why are we holding back other platforms
and other fixes for the sake of Solaris 8?"  

The answer up to now has been that, since Sol8's headers are correct C++, we
should be able to use them directly without having to do any fixincl work on
them at all.  The problem is that their headers do something like this (via
multiple headers not shown here):

namespace std
{
    proper_type  size_t;  // assume "proper_type" Does The Right Thing
}

#if __cplusplus >= 199711L
using std::size_t;
#endif

Then, somewhere else in the path of things, g++ sees our own version of
std::size_t, and pukes on the 'using' line with a "conflicting declaration"
error.  It's been a while since I tried it, but the exact analysis is in
the archives somewhere.

The /ideal/ solution -- and the solution which Gaby and I and others have
been hoping for -- is either to notice the Sol8 correct declarations and not
do anything ourselves, or to look at the conflict, deduce that proper_type
is in fact the proper type, and conclude that there isn't a conflict.  Using
fixincludes to hack up correct headers because g++ isn't quite smart enough
is a mistake in this case.

However, the bug has been there for over two years.  Sun has moved on and
made things different in Sol9 apparently (haven't seen the 9 headers myself).
Nobody has volunteered a fix for g++.  We may simply have to throw in the
towel on this issue and run Sol8 through fixincludes.


> | Remember that Solaris 8 is the *only* platform causing trouble.
>
> Don't be afraid that I'm forgetting bits.

"(Remember|Recall) that <point of observation>" is just an English-language
rhetorical technique used to bring a statement full circle.  No one is
questioning anyone's memory, especially when the entire audit trail is
present on the screen.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]