PR c++/28114
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jun 2006 21:58:25 +0000 (21:58 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jun 2006 21:58:25 +0000 (21:58 +0000)
* name-lookup.c (pushtag): Return if we have error_mark_node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114953 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c

index 178b0af..5a3ac21 100644 (file)
@@ -1,5 +1,10 @@
 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
 
+       PR c++/28114
+       * name-lookup.c (pushtag): Return if we have error_mark_node.
+
+2006-06-23  Steve Ellcey  <sje@cup.hp.com>
+
        PR c++/27019
        * typeck2.c (process_init_constructor_array): Set ce->value on errors.
 
index 3de9999..0d195f9 100644 (file)
@@ -4872,7 +4872,11 @@ pushtag (tree name, tree type, tag_scope scope)
            pushdecl_class_level (decl);
        }
       else if (b->kind != sk_template_parms)
-       decl = pushdecl_with_scope (decl, b, /*is_friend=*/false);
+       {
+         decl = pushdecl_with_scope (decl, b, /*is_friend=*/false);
+         if (decl == error_mark_node)
+           POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
+       }
 
       TYPE_CONTEXT (type) = DECL_CONTEXT (decl);