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

c-decl.c (grokfield): Allow typedefs for anonymous structs and unions by default if...

	* c-decl.c (grokfield): Allow typedefs for anonymous structs and
	unions by default if those structs and unions have no tags.  Do
	not condition anonymous struct and unions handling on flag_iso.
	Allow anonymous structs and unions for C1X.
	(finish_struct): Do not diagnose lack of named fields when
	anonymous structs and unions present for C1X.  Accept flexible
	array members in structure with anonymous structs or unions but no
	directly named fields.
	* doc/extend.texi (Unnamed Fields): Update.

testsuite:
	* gcc.dg/c1x-anon-struct-1.c, gcc.dg/c1x-anon-struct-2.c,
	gcc.dg/c90-anon-struct-1.c, gcc.dg/c99-anon-struct-1.c: New tests.
	* gcc.dg/20080820.c, gcc.dg/anon-struct-1.c: Update expected
	diagnostics and type sizes.

From-SVN: r159439
parent d025732d
No related branches found
No related tags found
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