svn commit: r300319 - head/contrib/gcc
Pedro F. Giffuni
pfg at FreeBSD.org
Fri May 20 18:01:54 UTC 2016
Author: pfg
Date: Fri May 20 18:01:53 2016
New Revision: 300319
URL: https://svnweb.freebsd.org/changeset/base/300319
Log:
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)
Modified:
head/contrib/gcc/c-typeck.c
Modified: head/contrib/gcc/c-typeck.c
==============================================================================
--- head/contrib/gcc/c-typeck.c Fri May 20 18:00:10 2016 (r300318)
+++ head/contrib/gcc/c-typeck.c Fri May 20 18:01:53 2016 (r300319)
@@ -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;
}
}
More information about the svn-src-head
mailing list