diff options
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 0d195f9..ea985e4 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2609,6 +2609,9 @@ push_class_level_binding (tree name, tree x) if (!class_binding_level) POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, true); + if (name == error_mark_node) + POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, false); + /* Check for invalid member names. */ gcc_assert (TYPE_BEING_DEFINED (current_class_type)); /* We could have been passed a tree list if this is an ambiguous @@ -2763,6 +2766,9 @@ do_class_using_decl (tree scope, tree name) tree base_binfo; int i; + if (name == error_mark_node) + return NULL_TREE; + if (!scope || !TYPE_P (scope)) { error ("using-declaration for non-member at class scope"); |