This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16667] New: GCC allows invalid syntax in C99 designated initializers


GCC silently accepts the following invalid code (with -Wall -W, any optimization level,
whether C99 or gnu99 mode is asked for or not):

-- snip --
struct x {
        int a;
        float b;
};

struct x bla = { .a 42 };
-- snip --

(it should be   .a = 42)

-- 
           Summary: GCC allows invalid syntax in C99 designated initializers
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: segher at kernel dot crashing dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]