This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54430] [C++11] For-Loop: Scope of iterating variable begins too early
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jul 2016 06:16:18 +0000
- Subject: [Bug c++/54430] [C++11] For-Loop: Scope of iterating variable begins too early
- Auto-submitted: auto-generated
- References: <bug-54430-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54430
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 21 06:15:43 2016
New Revision: 238569
URL: https://gcc.gnu.org/viewcvs?rev=238569&root=gcc&view=rev
Log:
PR c++/71604 - type definition in range-based for
PR c++/54430
* parser.c (cp_parser_range_for): Modify IDENTIFIER_BINDING directly.
(cp_parser_simple_declaration): Diagnose type definition in
for-range-declaration.
Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/range-for31.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/parser.c
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/range-for8.C