* typeck2.c (process_init_constructor): Fix labeled init check.
authorJason Merrill <jason@yorick.cygnus.com>
Tue, 24 Feb 1998 00:37:57 +0000 (00:37 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 24 Feb 1998 00:37:57 +0000 (19:37 -0500)
From-SVN: r18214

gcc/cp/ChangeLog
gcc/cp/typeck2.c

index d4f4fee..75ff86c 100644 (file)
@@ -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
index 35dccd7..21f90cb 100644 (file)
@@ -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");