This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: still problems with libstdcxx-v3 and -ansi
- To: llewelly at edevnull dot com,sxking at uswest dot net
- Subject: Re: still problems with libstdcxx-v3 and -ansi
- From: Steven King <sxking at uswest dot net>
- Date: Fri, 22 Sep 2000 08:46:21 -0700
- Cc: "Martin Reinecke" <martin at MPA-Garching dot MPG dot DE>,libstdc++ at sources dot redhat dot com
- Organization: is the root of all evil
- References: <39CB6AD6.F52FC2FC@mpa-garching.mpg.de> <00092207374200.02303@rigel> <m1vgvotrp2.fsf@edevnull.com>
- Reply-To: sxking at uswest dot net
On Fri, 22 Sep 2000, llewelly@edevnull.com wrote:
> Really? What about this?
>
> -ansi In C mode, support all ANSI standard C programs. In C++ mode,
> remove GNU extensions that conflict with ISO C++ [...snip]
>
> -pendantic
> Issue all the warnings demanded by strict ISO C and ISO C++ [...snip]
Ah yes... Thats why I said "one might argue" :} This does seem closer to what
the compiler actually does despite what gcc --help reports. Browsing the
source, it appears that gcc adjusts how it handles this depending on whether
its c or c++ and if c89 or c99 is specified.
On the other hand, the glibc headers (Martin didnt say what host he is using but
I'm guessing its a glibc based system) seem to think that _STRICT_ANSI_
(which is defined by -ansi) refers to c89 only, that is, one will get errors or
warnings if one tries to use c99 features with -ansi and glibc (which is the
root cause of the problem Martin reported).
On the other hand (no, I'm not motie) if one uses the shadow headers, the
problem Martin reported should go away...
--
Steven King
sxking@uswest.net