This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -std's (was Re: v3 link failures analyzed)
- To: Phil Edwards <pedwards at disaster dot jaj dot com>
- Subject: Re: -std's (was Re: v3 link failures analyzed)
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 10 Jan 2001 07:27:18 +0100
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, Robert Lipe <robertl at sco dot com>, libstdc++-v3 at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <20001230160338.A3505@rjlhome.sco.com> <20001231000529.C20493@disaster.jaj.com> <fld7e84uiv.fsf@sel.cmla.ens-cachan.fr> <20010110010817.A5394@disaster.jaj.com>
Phil Edwards <pedwards@disaster.jaj.com> writes:
| 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'
This must be a bug <g>.
| 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
The flags should reflect common usage. C89 used to mean the american
standardised ANSI 89 and C90 used to mean ISO C 90. The compiler
should accept -std=c90 to as a synonymous of -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?
In an ideal world, yes, you're right. But I have no idea of whether
the compiler understands that.
-- Gaby