re PR c++/85515 (Bogus suggestions from "GCC's leaky abstractions")
authorJakub Jelinek <jakub@redhat.com>
Wed, 25 Jul 2018 16:46:34 +0000 (18:46 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 25 Jul 2018 16:46:34 +0000 (18:46 +0200)
commit213f5e8accc3e6dad179eafd48c920e524b56be2
treefaf01b02efb3ee21176b6e67d3126676e4e778ce
parentc44fa4a6660c4d81891093578d5e9463d6d85b73
re PR c++/85515 (Bogus suggestions from "GCC's leaky abstractions")

PR c++/85515
* cp-tree.h (enum cp_tree_index): Add
CPTI_FOR_{RANGE,BEGIN,END}{,_}_IDENTIFIER.
(for_range__identifier, for_begin__identifier, for_end__identifier,
for_range_identifier, for_begin_identifier, for_end_identifier):
Define.
* decl.c (initialize_predefined_identifiers): Initialize
for_{range,begin,end}{,_}_identifier.
* parser.c (build_range_temp): Use for_range__identifier instead of
get_identifier ("__for_range").
(cp_convert_range_for): Use for_begin__identifier and
for_end__identifier instead of get_identifier ("__for_begin") and
get_identifier ("__for_end").
* semantics.c (finish_for_stmt): Rename "__for_{range,begin,end} "
local symbols to "__for_{range,begin,end}".

* g++.dg/pr85515-2.C: Add expected dg-error.
* g++.dg/cpp0x/range-for36.C: New test.

From-SVN: r262975
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/range-for36.C [new file with mode: 0644]
gcc/testsuite/g++.dg/pr85515-2.C