]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c/17189 (bogus warning for struct Foo { int; };)
authorJoseph Myers <jsm@polyomino.org.uk>
Sun, 10 Oct 2004 00:47:20 +0000 (01:47 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sun, 10 Oct 2004 00:47:20 +0000 (01:47 +0100)
commit216a5f1b3fd8bc312748ff226ab5e3c9c2db273c
treef192e170635c25ee19d58894e6355d869f6e0d82
parentfb643d23f7fae28aa40eaacb0b23db038feece8e
re PR c/17189 (bogus warning for  struct Foo { int; };)

PR c/17189
* c-decl.c (grokfield): Make diagnostic for bad cases of unnamed
fields a pedwarn.  Pedwarn here for unnamed structs/unions if
pedantic.
* c-parse.in (component_decl): Don't pedwarn here for unnamed
fields.

testsuite:
* gcc.dg/anon-struct-5.c: New test.

From-SVN: r88834
gcc/ChangeLog
gcc/c-decl.c
gcc/c-parse.in
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/anon-struct-5.c [new file with mode: 0644]