diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-10-10 01:47:20 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-10-10 01:47:20 +0100 |
commit | 216a5f1b3fd8bc312748ff226ab5e3c9c2db273c (patch) | |
tree | f192e170635c25ee19d58894e6355d869f6e0d82 /gcc/c-parse.in | |
parent | fb643d23f7fae28aa40eaacb0b23db038feece8e (diff) | |
download | gcc-216a5f1b3fd8bc312748ff226ab5e3c9c2db273c.zip gcc-216a5f1b3fd8bc312748ff226ab5e3c9c2db273c.tar.gz gcc-216a5f1b3fd8bc312748ff226ab5e3c9c2db273c.tar.bz2 |
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
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 3defcd0..e469677 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1738,9 +1738,6 @@ component_decl: /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports MS P-SDK). */ - if (pedantic) - pedwarn ("ISO C doesn't support unnamed structs/unions"); - $$ = grokfield (build_id_declarator (NULL_TREE), current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; } |