From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11533 invoked by alias); 21 Feb 2011 16:55:49 -0000 Received: (qmail 11521 invoked by uid 22791); 21 Feb 2011 16:55:48 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Feb 2011 16:55:44 +0000 From: "webmaster@sky-siteweb.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/47772] warnings from -Wmissing-field-initializers contradict documentation X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: webmaster@sky-siteweb.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Mon, 21 Feb 2011 17:03:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg02486.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D47772 Jonathan 'Sky' Squirawski changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |webmaster@sky-siteweb.com --- Comment #2 from Jonathan 'Sky' Squirawski 2= 011-02-21 16:55:39 UTC --- I've the same problem with gcc 4.5.2. Here another test case: /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ typedef struct bar_t { int a; int b; } bar_t; typedef struct foo_ok_t { int bar; bar_t foo; } foo_ok_t; typedef struct foo_nok_t { bar_t bar; bar_t foo; } foo_nok_t; int main(void) { foo_ok_t foo_ok; foo_nok_t foo_nok; foo_ok =3D (foo_ok_t){ .bar =3D 32, }; foo_nok =3D (foo_nok_t){ .bar =3D (bar_t){ .a =3D 32, .b =3D 42 }, }; return 0; } /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/ The first assignment doesn't trigger any warning, but the second one gives: test.c:29:5: warning: missing initializer test.c:29:5: warning: (near initialization for =E2=80=98(anonymous).foo=E2= =80=99)