aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-02-24 00:37:57 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-02-23 19:37:57 -0500
commit6c3e25ebe24f8b757d68fdfcff6c46238d24efa4 (patch)
tree257bcddb445a10cbf6ae913ca2fb48b84eff6a51
parentd7ab20570c68c200801682097fadab75b76bb9ef (diff)
downloadgcc-6c3e25ebe24f8b757d68fdfcff6c46238d24efa4.zip
gcc-6c3e25ebe24f8b757d68fdfcff6c46238d24efa4.tar.gz
gcc-6c3e25ebe24f8b757d68fdfcff6c46238d24efa4.tar.bz2
* typeck2.c (process_init_constructor): Fix labeled init check.
From-SVN: r18214
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck2.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d4f4fee..75ff86c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * typeck2.c (process_init_constructor): Fix labeled init check.
+
Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
* pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 35dccd7..21f90cb 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1044,6 +1044,7 @@ process_init_constructor (type, init, elts)
continue;
if (TREE_PURPOSE (tail)
+ && TREE_PURPOSE (tail) != field
&& TREE_PURPOSE (tail) != DECL_NAME (field))
sorry ("non-trivial labeled initializers");