This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -ansi vs. V3
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: -ansi vs. V3
- From: Tom Leete <tleete at mountain dot net>
- Date: Tue, 06 Feb 2001 19:58:52 -0500
- CC: gcc at gcc dot gnu dot org, Jason Merrill <jason at cygnus dot com>, Benjamin Kosnik <bkoz at nabi dot net>
- References: <20010206102828O.mitchell@codesourcery.com>
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