GCC: Add support for named initializers for anonymous structs/unions.

Missing hunk from r300301.

Reported by:	Ed Schouten
Obtained from:	OpenBSD (CVS rev. 1.2)
This commit is contained in:
Pedro F. Giffuni 2016-05-20 18:01:53 +00:00
parent 10544b0951
commit 0d1bd3bc60
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300319

View file

@ -6074,13 +6074,24 @@ set_init_label (tree fieldname)
if (tail == 0)
error ("unknown field %qE specified in initializer", fieldname);
else
while (tail)
{
constructor_fields = tail;
designator_depth++;
designator_erroneous = 0;
if (constructor_range_stack)
push_range_stack (NULL_TREE);
if (anon)
{
if (set_designator (0))
return;
tail = TREE_VALUE(anon);
anon = TREE_CHAIN(anon);
}
else
tail = NULL_TREE;
}
}