* typeck2.c (process_init_constructor): Fix labeled init check.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Feb 1998 00:37:57 +0000 (00:37 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Feb 1998 00:37:57 +0000 (00:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18214 138bc75d-0d04-0410-961f-82ee72b054a4

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");