This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26581] incomplete (unsized) static array types cannot be completed
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2006 14:10:10 -0000
- Subject: [Bug c/26581] incomplete (unsized) static array types cannot be completed
- References: <bug-26581-12315@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from joseph at codesourcery dot com 2006-03-06 14:10 -------
Subject: Re: New: incomplete (unsized) static array types
cannot be completed
On Mon, 6 Mar 2006, bernard at brenda-arkle dot demon dot co dot uk wrote:
> static int thingy2[];
> static int thingy2[1];
This contradicts 6.9.2 paragraph 3: "If the declaration of an identifier
for an object is a tentative definition and has internal linkage, the
declared type shall not be an incomplete type.". (Undefined behavior
since it's not in a Constraints section, so diagnostic not required, but
as a quality of implementation matter it should be diagnosed at least with
-pedantic.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26581