aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-04-07 11:55:02 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-04-07 11:55:02 -0400
commitae099258d3654e328fca96e0ebd457487a70a685 (patch)
tree5d11af1d0803ae77593c8e8e5b7621b20166dee5 /gcc/cp/name-lookup.c
parentfeb3b88ad7ea6de3d0f63b41226f0b90c36a0c07 (diff)
downloadgcc-ae099258d3654e328fca96e0ebd457487a70a685.zip
gcc-ae099258d3654e328fca96e0ebd457487a70a685.tar.gz
gcc-ae099258d3654e328fca96e0ebd457487a70a685.tar.bz2
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
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c3
1 files changed, 2 insertions, 1 deletions
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 ();