This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-std's (was Re: v3 link failures analyzed)
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: -std's (was Re: v3 link failures analyzed)
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Wed, 10 Jan 2001 01:08:17 -0500
- Cc: Robert Lipe <robertl at sco dot com>, libstdc++-v3 at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- References: <20001230160338.A3505@rjlhome.sco.com> <20001231000529.C20493@disaster.jaj.com> <fld7e84uiv.fsf@sel.cmla.ens-cachan.fr>
On Sun, Dec 31, 2000 at 01:58:32PM +0100, Gabriel Dos Reis wrote:
> Phil Edwards <pedwards@disaster.jaj.com> writes:
> | On Sat, Dec 30, 2000 at 04:03:38PM -0600, Robert Lipe wrote:
> | >
> | > It seems to me that the -ansi-ness of the testsuite invocation needs to
> | > match that of the autoconf invocation, but I could be talked out of that.
> |
> | Well, they definitely need to match if the testsuite is going to run
> | on openserver, right? I think we should be using -ansi/-std=c89 when
> | configuring and building the library when possible.
>
> Agreed.
>
> | Hmmm... I wonder if std=c89 has any effects on C++?
>
> Just for clarity: std=c90 -- even though c89 and c90 are identical.
Well, you know that, and I know that, but the compiler doesn't:
% gcc -std=c90 ib.c
cc1: unknown C standard `c90'
cc1: unknown C standard `c90'
%
We could teach the compiler that c89 and c90 are identical, as you say,
or we could just use one of the expanded forms documented in c-decl.c:
-std=iso9899:1990 same as -ansi
-std=iso9899:199409 ISO C as modified in amend. 1
-std=iso9899:1999 ISO C 99
-std=c89 same as -std=iso9899:1990
-std=c99 same as -std=iso9899:1999
-std=gnu89 default, iso9899:1990 + gnu extensions
-std=gnu99 iso9899:1999 + gnu extensions
For v3 I think -std=iso9899:199409 is the closest we want. Gaby? Benjamin?
Phil
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.