From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16305 invoked by alias); 6 Mar 2006 18:35:59 -0000 Received: (qmail 16289 invoked by uid 48); 6 Mar 2006 18:35:54 -0000 Date: Mon, 06 Mar 2006 18:35:00 -0000 Message-ID: <20060306183554.16288.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/26581] incomplete (unsized) static array types cannot be completed In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bernard at brenda-arkle dot demon dot co dot uk" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00654.txt.bz2 List-Id: ------- Comment #4 from bernard at brenda-arkle dot demon dot co dot uk 2006-03-06 18:35 ------- Thanks - I'd forgotten that 'static' declarations can be tentative definitions too. But now I'm even more confused! As I wrote, unsized arrays do one thing, undefined structs do another (this is a "gcc fact" whatever its ANSI-legal status). Consider this: 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? If I'm wrong again about this, I'll shut up... Bernard Leak -- I remember when the Standard had fewer than 8 bits' worth of confusing pages! -- bernard at brenda-arkle dot demon dot co dot uk changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26581