mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
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:
parent
10544b0951
commit
0d1bd3bc60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300319
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user