re PR c/17188 (struct Foo { } redefinition)
authorJoseph Myers <jsm@polyomino.org.uk>
Fri, 24 Sep 2004 17:22:20 +0000 (18:22 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 24 Sep 2004 17:22:20 +0000 (18:22 +0100)
commit085e33aa0ad674c2680e6216b7d84737b935351c
tree0df83d2241d0c2e8cf4abfc9975db885362bef6d
parenta2159c4c35aa1759292e9cce4ae97bbf04c5861e
re PR c/17188 (struct Foo { } redefinition)

PR c/17188
* c-decl.c (diagnose_mismatched_decls): Check for duplicate
declarations of enumerators.
(start_struct): Check TYPE_SIZE rather than TYPE_FIELDS to check
for redefinition.  Check for nested redefinition.
(finish_struct): Don't check for nested redefinition.
(start_enum): Check for nested redefinition.

testsuite:
* gcc.dg/nested-redef-1.c, gcc.dg/pr17188-1.c: New tests.
* gcc.dg/decl-3.c: Adjust expected message.

From-SVN: r88063
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/decl-3.c
gcc/testsuite/gcc.dg/nested-redef-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr17188-1.c [new file with mode: 0644]