c/6559: "-std=c99 -pedantic" displays c89 warning
schnetter@uni-tuebingen.de
schnetter@uni-tuebingen.de
Sat May 4 10:36:00 GMT 2002
>Number: 6559
>Category: c
>Synopsis: "-std=c99 -pedantic" displays c89 warning
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 04 10:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Erik Schnetter
>Release: 3.0.4
>Organization:
>Environment:
SuSE Linux 7.3
>Description:
I have a function using a variable sized array. This function is legal in C99, but not legal in C89. When I compile with
~/gcc/bin/gcc -std=c99 -pedantic -c c99ped.c
then I receive the warning
c99ped.c: In function `c99ped':
c99ped.c:3: warning: ISO C89 forbids variable-size array `x'
I think that this warning should not be there, because I explicitely selected the C99 standard. In this case, I want -pedantic to warn only about violations of the C99 standard.
My source code is the four lines of
void c99ped (int dim)
{
double (* x)[dim];
}
$ ~/gcc/bin/gcc --version
3.0.4
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list