From: jakub Date: Tue, 17 Mar 2009 17:52:08 +0000 (+0000) Subject: PR debug/37890 X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=6ace4ee2823bd24b7ad025b47c5c385262c2b85e;ds=sidebyside PR debug/37890 * name-lookup.c (do_namespace_alias): Don't call global_decl debug hook at function scope. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144913 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b25d19be7cb..f948a6e32f6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -6,6 +6,10 @@ * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand is a NAMESPACE_DECL. + PR debug/37890 + * name-lookup.c (do_namespace_alias): Don't call global_decl debug + hook at function scope. + PR debug/39471 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME on IMPORTED_DECL. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index eec7c44cbd9..308df8c9c17 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3337,7 +3337,8 @@ do_namespace_alias (tree alias, tree name_space) pushdecl (alias); /* Emit debug info for namespace alias. */ - (*debug_hooks->global_decl) (alias); + if (!building_stmt_tree ()) + (*debug_hooks->global_decl) (alias); } /* Like pushdecl, only it places X in the current namespace,