Date: Fri, 20 May 2016 18:01:53 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300319 - head/contrib/gcc Message-ID: <201605201801.u4KI1r18094092@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605201801.u4KI1r18094092>