-ansi vs. V3
Tom Leete
tleete@mountain.net
Tue Feb 6 16:59:00 GMT 2001
Mark Mitchell wrote:
>
> I've gotten a couple of off-list emails about this.
>
> I'm not sure what to do. I think the right thing is to have a a
> different preprocessor spec for C++ than C, so that -ansi can be
> handled differently in C++. It turns out that `g++ -ansi' is broken
> on AIX, OpenServer, and probably some other platforms as well.
>
> Another approach would simply be not to use -ansi in the testsuite
> when running `make check-g++'. That might be simplest, in the short
> term. Then, everyone could run tests, and it actually makes sense to
> test the default options most heavily. Then, if users want to use
> -ansi, they may find it doesn't work some places -- but they can
> always fall back to *not* using -ansi.
>
> Thoughts?
>
> --
> Mark Mitchell mark@codesourcery.com
> CodeSourcery, LLC http://www.codesourcery.com
Strict ansi C++ should require the use of, eg.:
#include <cstdio>
rather than
#include <stdio.h>
The latter gives trouble on any platform.
Cheers,
Tom
--
The Daemons lurk and are dumb. -- Emerson
More information about the Gcc
mailing list