* call.c (build_call_a): Also check at_function_scope_p.

From-SVN: r177185
This commit is contained in:
Jason Merrill 2011-08-02 11:35:09 -04:00 committed by Jason Merrill
parent 3c3a516054
commit 1e88210d7f
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-08-02 Jason Merrill <jason@redhat.com>
* call.c (build_call_a): Also check at_function_scope_p.
2011-08-01 Jason Merrill <jason@redhat.com>
PR c++/49932

View File

@ -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)