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 18:58:13 -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 #5 from joseph at codesourcery dot com 2006-03-06 18:58 -------
Subject: Re: incomplete (unsized) static array types cannot be
completed
On Mon, 6 Mar 2006, bernard at brenda-arkle dot demon dot co dot uk wrote:
> struct poo; /* declares an incomplete structure type, 6.7.2.3 para. 7 */
> static struct poo thingy; /* a tentative definition, 6.9.2 para. 2 */
> /* The structure type is still incomplete, 6.7.2.3 para. 3 */
> /* any subsequent definition of struct poo is too late */
>
> Shouldn't this now be flagged as an error, at least if '-pedantic'
> is requested?
Yes. Again, this is a quality-of-implementation issue since the
requirement is not a Constraint. I'm already aware of the issue that if
the struct is subsequently defined there isn't an error here, though I
don't think there's a bug filed (bug 24293 is related but not the same).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26581