oops
authorJason Merrill <jason@gcc.gnu.org>
Thu, 19 Feb 1998 11:32:23 +0000 (06:32 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 19 Feb 1998 11:32:23 +0000 (06:32 -0500)
From-SVN: r18122

gcc/cp/typeck2.c

index a0c2bf9..35dccd7 100644 (file)
@@ -962,7 +962,9 @@ process_init_constructor (type, init, elts)
        {
          register tree next1;
 
-         if (TREE_PURPOSE (tail))
+         if (TREE_PURPOSE (tail)
+             && (TREE_CODE (TREE_PURPOSE (tail)) != INTEGER_CST
+                 || TREE_INT_CST_LOW (TREE_PURPOSE (tail)) != i))
            sorry ("non-trivial labeled initializers");
 
          if (TREE_VALUE (tail) != 0)