commit ea2b4023d77cbb75ffdb0f71fec35d366b759a70
Author: Jason Merrill <jason@redhat.com>
Date: Sun Jun 5 23:42:13 2011 -0400
PR objc++/49221
* decl.c (cp_finish_decl): Check DECL_FUNCTION_SCOPE_P rather than
at_function_scope_p.
@@ -6190,7 +6190,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
/* Add this declaration to the statement-tree. This needs to happen
after the call to check_initializer so that the DECL_EXPR for a
reference temp is added before the DECL_EXPR for the reference itself. */
- if (at_function_scope_p ())
+ if (DECL_FUNCTION_SCOPE_P (decl))
add_decl_expr (decl);
/* Let the middle end know about variables and functions -- but not