[Bug c++/20209] New: [3.3/3.4/4.0 Regression] Missing warnings for "aggregate has a partly bracketed initializer"

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Feb 25 19:49:00 GMT 2005


The following should have warnings:
struct S { char a[6]; int b[2]; };

S S0 = { { "hello" }, { 1, 2 } };
S S1 = { { "hello" }, 1, 2 }; // { dg-warning "" }
S S2 = { "hello", { 1, 2 } };
S S3 = { "hello", 1, 2 }; // { dg-warning "" }

-- 
           Summary: [3.3/3.4/4.0 Regression] Missing warnings for "aggregate
                    has a partly bracketed initializer"
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20209



More information about the Gcc-bugs mailing list