This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Re: still problems with libstdcxx-v3 and -ansi


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

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