diff options
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index dc8ef9046ec..15927c69166 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -125,7 +125,7 @@ push_search_level (struct stack_level *stack, struct obstack *obstack) static struct search_level * pop_search_level (struct stack_level *obstack) { - register struct search_level *stack = pop_stack_level (obstack); + struct search_level *stack = pop_stack_level (obstack); return stack; } @@ -422,7 +422,7 @@ get_dynamic_cast_base_type (tree subtype, tree target) tree lookup_field_1 (tree type, tree name, bool want_type) { - register tree field; + tree field; if (TREE_CODE (type) == TEMPLATE_TYPE_PARM || TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM @@ -580,6 +580,16 @@ at_class_scope_p (void) return cs && TYPE_P (cs); } +/* Returns true if the innermost active scope is a namespace scope. */ + +bool +at_namespace_scope_p (void) +{ + /* We are in a namespace scope if we are not it a class scope or a + function scope. */ + return !current_scope(); +} + /* Return the scope of DECL, as appropriate when doing name-lookup. */ tree |