OSDN Git Service

PR c/17188
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Sep 2004 17:22:20 +0000 (17:22 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Sep 2004 17:22:20 +0000 (17:22 +0000)
commit5dad28f1aa5236c87acd9baa5fed055743addf04
tree0df83d2241d0c2e8cf4abfc9975db885362bef6d
parente9437a8f0034393543bef9634d5488654c03d310
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88063 138bc75d-0d04-0410-961f-82ee72b054a4
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]