Skip to content
Snippets Groups Projects
Commit 085e33aa authored by Joseph Myers's avatar Joseph Myers Committed by Joseph Myers
Browse files

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
parent a2159c4c
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment