public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/6559: "-std=c99 -pedantic" displays c89 warning
@ 2002-05-04 12:06 Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2002-05-04 12:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/6559; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: schnetter@uni-tuebingen.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/6559: "-std=c99 -pedantic" displays c89 warning
Date: Sat, 4 May 2002 15:03:19 -0400
This is fixed for 3.1 and above
On Saturday, May 4, 2002, at 01:29 , schnetter@uni-tuebingen.de wrote:
> gcc -std=c99 -pedantic -c c99ped.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/6559: "-std=c99 -pedantic" displays c89 warning
@ 2002-05-16 22:38 rth
0 siblings, 0 replies; 4+ messages in thread
From: rth @ 2002-05-16 22:38 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, schnetter
Synopsis: "-std=c99 -pedantic" displays c89 warning
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Thu May 16 22:38:44 2002
State-Changed-Why:
Duplicate of 3467.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6559
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c/6559: "-std=c99 -pedantic" displays c89 warning
@ 2002-05-16 21:36 M. P. Halpin
0 siblings, 0 replies; 4+ messages in thread
From: M. P. Halpin @ 2002-05-16 21:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/6559; it has been noted by GNATS.
From: "M. P. Halpin" <mphalpin@cc.gatech.edu>
To: schnetter@uni-tuebingen.de, pinskia@physics.uc.edu
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/6559: "-std=c99 -pedantic" displays c89 warning
Date: Fri, 17 May 2002 00:32:53 -0400 (EDT)
Howdy. I hate to be a bother, but on gnatsweb it said this was fixed in
gcc3.1. I just downloaded and installed the gcc3.1 release on my local
workstation (FreeBSD 4.5), and it's still giving warnings when I compile
(I was using "-std=c99 -pedantic -O3 -Wall"). So I grepped the source and
found this in c-decl.c, starting on line 4620:
if (pedantic)
{
if (TREE_CONSTANT (size))
pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated",
name);
else
pedwarn ("ISO C89 forbids variable-size array `%s'",
name);
}
Changing "if (pedantic)" to "if (pedantic && !flag_isoc99)" seemed to
fix the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
* c/6559: "-std=c99 -pedantic" displays c89 warning
@ 2002-05-04 10:36 schnetter
0 siblings, 0 replies; 4+ messages in thread
From: schnetter @ 2002-05-04 10:36 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-17 5:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-04 12:06 c/6559: "-std=c99 -pedantic" displays c89 warning Andrew Pinski
-- strict thread matches above, loose matches on Subject: below --
2002-05-16 22:38 rth
2002-05-16 21:36 M. P. Halpin
2002-05-04 10:36 schnetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).