From 1e88210d7fff339ded2a3562b49498d835c8ecf8 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 2 Aug 2011 11:35:09 -0400 Subject: [PATCH] * call.c (build_call_a): Also check at_function_scope_p. From-SVN: r177185 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/call.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4ce77d41553..65d0e7c6628 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2011-08-02 Jason Merrill + + * call.c (build_call_a): Also check at_function_scope_p. + 2011-08-01 Jason Merrill PR c++/49932 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 2eab78266f8..b0133e21709 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -352,7 +352,7 @@ build_call_a (tree function, int n, tree *argarray) nothrow = ((decl && TREE_NOTHROW (decl)) || TYPE_NOTHROW_P (TREE_TYPE (TREE_TYPE (function)))); - if (!nothrow && cfun && cp_function_chain) + if (!nothrow && at_function_scope_p () && cfun && cp_function_chain) cp_function_chain->can_throw = 1; if (decl && TREE_THIS_VOLATILE (decl) && cfun && cp_function_chain) -- 2.30.2