From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4910 invoked by alias); 3 Jan 2015 15:27:27 -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 Received: (qmail 4891 invoked by uid 48); 3 Jan 2015 15:27:23 -0000 From: "petr.pisar at atlas dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64480] New: List designated initializer triggers -Wmissing-field-initializers Date: Sat, 03 Jan 2015 15:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: petr.pisar at atlas dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00108.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64480 Bug ID: 64480 Summary: List designated initializer triggers -Wmissing-field-initializers Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: petr.pisar at atlas dot cz This code: struct lower { char *foo; char *bar; }; struct upper { struct lower inner; }; int main (void) { struct upper u =3D { /* This triggers -Wmissing-field-initializers warning */ .inner.foo =3D "Foo", .inner.bar =3D "Bar", /* While this passes:=20 .inner =3D { .foo =3D "Foo", .bar =3D "Bar", }, */ }; (void)u; return 0; } Triggers warning about initialized lower.bar field: $ gcc -Wall -Wextra -std=3Dc99 -O0 -g test.c test.c: In function =E2=80=98main=E2=80=99: test.c:14:9: warning: missing initializer for field =E2=80=98bar=E2=80=99 o= f =E2=80=98struct lower=E2=80=99 [-Wmissing-field-initializers] .inner.bar =3D "Bar", ^ test.c:3:11: note: =E2=80=98bar=E2=80=99 declared here char *bar; ^ If I change to initialization from the list form (.inner.foo=3D) to nested (.inner=3D{.foo=3D}), then it passes. The change is commented out in the qu= oted code. I think the list syntax is valid per C99, 6.7.9 Initialization grammar. >>From gcc-bugs-return-472115-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jan 03 15:48:02 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21225 invoked by alias); 3 Jan 2015 15:48:02 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 21084 invoked by uid 48); 3 Jan 2015 15:47:57 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60255] [OOP] Deferred character length variable at (1) cannot yet be associated with unlimited polymorphic entities Date: Sat, 03 Jan 2015 15:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: vehre at gmx dot de X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status assigned_to short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00109.txt.bz2 Content-length: 771 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60255 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |vehre at gmx dot de Summary|[oop] Deferred character |[OOP] Deferred character |length variable at (1) |length variable at (1) |cannot yet be associated |cannot yet be associated |with unlimited polymorphic |with unlimited polymorphic |entities |entities