[v3] c++0x includes

Doug Gregor doug.gregor@gmail.com
Sun Mar 11 14:05:00 GMT 2007


On 3/11/07, Paolo Carlini <pcarlini@suse.de> wrote:
> >Since __GNUC__ and __STRICT_ANSI__ are defined, we get _STRICT_STDC.
> >
> >One solution may be to have G++ define _STDC_C99 or __C99FEATURES__ on
> >solaris10.  I'm not sure.

This probably isn't the right thing to do, because C++0x doesn't
support all of C99.
What we need is for the C++ committee to define a new value of
__cplusplus for C++0x, so C libraries can start doing the right
thing...

> >
> I see, things start to make sense, thanks. My instinctive reaction, is
> that we are doing something slightly wrong with -std=c++0x, in the sense
> that it should *not* affect the behavior of code (macros) in *C* headers
> checking for *C* (vs C++) features. I'll try to look a bit more into the
> issue, but I'm asking a little help also from Doug (I know he has a lot
> of other current issues...), the author of that new switch...

In addition to -std=c++0x, there is also -std=gnu++0x, which adds the
C++0x features but retains GNU extensions. It's just like -std=c++
(which enables strict C++98/03) vs. -std=gnu++ (this is the default).

So, I suggest just changing the C++0x testing in libstdc++ to use -std=gnu++0x.

  Cheers,
  Doug



More information about the Libstdc++ mailing list