This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14366] variable previously declared `static' redeclared `extern' is valid ISO C - 3.4 and 3.5 regression
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2004 17:01:49 -0000
- Subject: [Bug c/14366] variable previously declared `static' redeclared `extern' is valid ISO C - 3.4 and 3.5 regression
- References: <20040301165520.14366.amylaar@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-03-01 17:01 -------
Subject: Re: New: variable previously declared `static' redeclared `extern' is valid ISO C - 3.4 and 3.5 regression
"amylaar at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| This testcase:
|
| static int i;
|
| void f ()
| {
| extern int i;
| }
[...]
| Thus, for ISO 9899:1999, my testcase should still pass, as i has internal
| linkage both times.
Your assessment is correct, and that has always be the case since the old
days of C.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14366