re PR c++/28291 (ICE on invalid designated initializer)
authorSteve Ellcey <sje@cup.hp.com>
Mon, 17 Jul 2006 15:28:17 +0000 (15:28 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Mon, 17 Jul 2006 15:28:17 +0000 (15:28 +0000)
PR c++/28291
* decl.c (reshape_init_class): Return error_mark_node on error.

From-SVN: r115523

gcc/cp/ChangeLog
gcc/cp/decl.c

index 4741d4a996c7ad9acf1d6345a41f200d50043d96..ebbbb6219f7ff9aae3a981637af1aa5da3949b81 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-17  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c++/28291
+       * decl.c (reshape_init_class): Return error_mark_node on error.
+
 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
 
        PR c++/28304
index b74a1a9bac60127e847ce48492843e63c75404a0..dd0e7e3e892e9e23f74e9d4ac20f0c5a444895bd 100644 (file)
@@ -4505,8 +4505,11 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p)
          field = lookup_field_1 (type, d->cur->index, /*want_type=*/false);
 
          if (!field || TREE_CODE (field) != FIELD_DECL)
-           error ("%qT has no non-static data member named %qD", type,
-                 d->cur->index);
+           {
+             error ("%qT has no non-static data member named %qD", type,
+                   d->cur->index);
+             return error_mark_node;
+           }
        }
 
       /* If we processed all the member of the class, we are done.  */