public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39605] New: "error: variable-size type declared outside of any function" is issued twice
@ 2009-03-31 22:55 gerald at pfeifer dot com
2009-04-01 0:05 ` [Bug c/39605] " jsm28 at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gerald at pfeifer dot com @ 2009-03-31 22:55 UTC (permalink / raw)
To: gcc-bugs
The following snippet
#define FIRST ((void*)0x80)
#define LAST ((void*)0x86)
static int b[LAST-FIRST];
now (2009-03-31) generates the following compiler errors which did not
appear two(?) days ago.
error: variable-size type declared outside of any function
error: variable-size type declared outside of any function
I assume the diagnosis as such is correct, but the fact that it is issued
twice doesn't seem to be.
I believe this is a consequence of the following patch.
2009-03-29 Joseph Myers <joseph@codesourcery.com>
PR c/456
PR c/5675
PR c/19976
PR c/29116
PR c/31871
PR c/35198
--
Summary: "error: variable-size type declared outside of any
function" is issued twice
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gerald at pfeifer dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39605
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/39605] "error: variable-size type declared outside of any function" is issued twice
2009-03-31 22:55 [Bug c/39605] New: "error: variable-size type declared outside of any function" is issued twice gerald at pfeifer dot com
@ 2009-04-01 0:05 ` jsm28 at gcc dot gnu dot org
2009-04-01 14:41 ` jsm28 at gcc dot gnu dot org
2009-04-01 14:46 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-01 0:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jsm28 at gcc dot gnu dot org 2009-04-01 00:05 -------
I am testing a patch that will change the diagnostics to
warning: variably modified 'b' at file scope
appearing exactly once (this is a pedwarn, so an error with -pedantic-errors).
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jsm28 at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-01 00:05:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39605
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/39605] "error: variable-size type declared outside of any function" is issued twice
2009-03-31 22:55 [Bug c/39605] New: "error: variable-size type declared outside of any function" is issued twice gerald at pfeifer dot com
2009-04-01 0:05 ` [Bug c/39605] " jsm28 at gcc dot gnu dot org
@ 2009-04-01 14:41 ` jsm28 at gcc dot gnu dot org
2009-04-01 14:46 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-01 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jsm28 at gcc dot gnu dot org 2009-04-01 14:41 -------
Subject: Bug 39605
Author: jsm28
Date: Wed Apr 1 14:41:06 2009
New Revision: 145405
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145405
Log:
PR c/39605
* c-decl.c (grokdeclarator): Pedwarn for file-scope array
declarator whose size is not an integer constant expression but
folds to an integer constant, then treat it as a constant
subsequently.
testsuite:
* gcc.dg/vla-17.c, gcc.dg/vla-18.c: New tests.
* gcc.dg/pr25682.c: Update expected diagnostics.
Added:
trunk/gcc/testsuite/gcc.dg/vla-17.c
trunk/gcc/testsuite/gcc.dg/vla-18.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr25682.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39605
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/39605] "error: variable-size type declared outside of any function" is issued twice
2009-03-31 22:55 [Bug c/39605] New: "error: variable-size type declared outside of any function" is issued twice gerald at pfeifer dot com
2009-04-01 0:05 ` [Bug c/39605] " jsm28 at gcc dot gnu dot org
2009-04-01 14:41 ` jsm28 at gcc dot gnu dot org
@ 2009-04-01 14:46 ` jsm28 at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-01 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jsm28 at gcc dot gnu dot org 2009-04-01 14:46 -------
Fixed on trunk for 4.5.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.5.0
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39605
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-01 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 22:55 [Bug c/39605] New: "error: variable-size type declared outside of any function" is issued twice gerald at pfeifer dot com
2009-04-01 0:05 ` [Bug c/39605] " jsm28 at gcc dot gnu dot org
2009-04-01 14:41 ` jsm28 at gcc dot gnu dot org
2009-04-01 14:46 ` jsm28 at gcc dot gnu dot org
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).