This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16667] New: GCC allows invalid syntax in C99 designated initializers
- From: "segher at kernel dot crashing dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2004 06:03:16 -0000
- Subject: [Bug c/16667] New: GCC allows invalid syntax in C99 designated initializers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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