From ae099258d3654e328fca96e0ebd457487a70a685 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 7 Apr 2010 11:55:02 -0400 Subject: name-lookup.c (current_decl_namespace): Non-static. * name-lookup.c (current_decl_namespace): Non-static. (pop_nested_namespace): Sanity check. * cp-tree.h: Declare current_decl_namespace. * decl.c (grokvardecl): Use it instead of current_namespace. (grokfndecl): Likewise. * gnu/gcj/runtime/natSharedLibLoader.cc (findCore): Move declaration of _Jv_create_core out of the function. From-SVN: r158074 --- gcc/cp/name-lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/cp/name-lookup.c') diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 7b43d30..b4ac49f 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3170,7 +3170,7 @@ set_decl_namespace (tree decl, tree scope, bool friendp) /* Return the namespace where the current declaration is declared. */ -static tree +tree current_decl_namespace (void) { tree result; @@ -3342,6 +3342,7 @@ void pop_nested_namespace (tree ns) { timevar_push (TV_NAME_LOOKUP); + gcc_assert (current_namespace == ns); while (ns != global_namespace) { pop_namespace (); -- cgit v1.1