diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2015-10-01 22:22:08 +0300 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2015-10-01 22:22:08 +0300 |
commit | 55fec44def29854be875ac68c304fc0c55b538ff (patch) | |
tree | c64ed0713431721871f5a948d0649009558ae7f7 /gcc/cp/name-lookup.c | |
parent | 0d1a8f7517eaed1d38d3827248e007634475bca4 (diff) | |
download | gcc-55fec44def29854be875ac68c304fc0c55b538ff.zip gcc-55fec44def29854be875ac68c304fc0c55b538ff.tar.gz gcc-55fec44def29854be875ac68c304fc0c55b538ff.tar.bz2 |
re PR c++/54430 ([C++11] For-Loop: Scope of iterating variable begins too early)
PR c++/54430
/cp
2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/54430
* name-lookup.c (push_binding): Make non-static.
* name-lookup.h (push_binding): Declare it.
* parser.c (cp_parser_range_for): Use it, get the range
declaration away from the scope until the range expression
has been parsed, then restore the declaration.
/testsuite
2015-10-01 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/54430
* g++.dg/cpp0x/range-for30.C: New.
From-SVN: r228354
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index baaf3e7..bd052a4 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -332,7 +332,7 @@ new_class_binding (tree name, tree value, tree type, cp_binding_level *scope) /* Make DECL the innermost binding for ID. The LEVEL is the binding level at which this declaration is being bound. */ -static void +void push_binding (tree id, tree decl, cp_binding_level* level) { cxx_binding *binding; |