This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20631] New: Support -std=c90 as alias for -std=c89
- From: "kst at mib dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2005 22:17:26 -0000
- Subject: [Bug c/20631] New: Support -std=c90 as alias for -std=c89
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc supports the options "-std=c89" and "-std=c99". I suggest adding
"-std=c90" as an alias for "-std=c89".
C89 is the ANSI C standard. C90 is the ISO C standard, which is
effectively identical (the most significant difference was a change
in the section numbering). In my opinion, the name "C90" should be
preferred to "C89"; in any case, both should be considered valid.
The following illustrates the issue. These commands were run on an x86
Fedora Core 2 system (i686-pc-linux-gnu). The last command produced
no output (as expected). My suggestion is that "-std=c90" should
behave identically to "-std=c89". Note that one of the diagnostics
refers to ISO C90, but the command-line option requires "c89".
% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/
usr/share/info --enable-shared --enable-threads=posix --disable-checking --
disable-libunwind-exceptions --with-system-zlib --enable-__cxa_atexit --
host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
% cat tmp.c
void tmp(void)
{
int n = 10;
int arr[n];
}
% gcc -c -std=c89 -pedantic tmp.c
tmp.c: In function `tmp':
tmp.c:4: warning: ISO C90 forbids variable-size array `arr'
% gcc -c -std=c90 -pedantic tmp.c
cc1: error: unrecognized option `-std=c90'
% gcc -c -std=c99 -pedantic tmp.c
%
--
Summary: Support -std=c90 as alias for -std=c89
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kst at mib dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20631