diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-07 15:55:02 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-07 15:55:02 +0000 |
commit | 305104fdc55b3a2237c6fff6f36545556a28d91c (patch) | |
tree | 5d11af1d0803ae77593c8e8e5b7621b20166dee5 /gcc/cp/name-lookup.c | |
parent | 90fb08fc73be441f9af09ad8ca93b6d837bc4dcf (diff) | |
download | gcc-305104fdc55b3a2237c6fff6f36545556a28d91c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 7b43d30f47e..b4ac49f5c32 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 (); |