From ee336e846de46aa5523a96f712d247c31a07c6e1 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 7 May 2018 23:04:22 +0000 Subject: [C++ PATCH] Kill -fno-for-scope https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00299.html gcc/cp/ Remove fno-for-scope * cp-tree.h (DECL_ERROR_REPORTED, DECL_DEAD_FOR_LOCAL) (DECL_HAS_SHADOWED_FOR_VAR_P, DECL_SHADOWED_FOR_VAR) (SET_DECL_SHADOWED_FOR_VAR): Delete. (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert) (check_for_out_of_scope_variable, init_shadowed_var_for_decl): Don't declare. * name-lookup.h (struct cp_binding_level): Remove dead_vars_from_for field. * cp-lang.c (cp_init_ts): Delete. (LANG_HOOKS_INIT_TS): Override to cp_common_init_ts. * cp-objcp-common.c (shadowed_var_for_decl): Delete. (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert) (init_shadowed_var_for_decl): Delete. * decl.c (poplevel): Remove shadowed for var handling. (cxx_init_decl_processing): Remove -ffor-scope deprecation. * name-lookup.c (find_local_binding): Remove shadowed for var handling. (check_local_shadow): Likewise. (check_for_out_of_scope_variable): Delete. * parser.c (cp_parser_primary_expression): Remove shadowed for var handling. * pt.c (tsubst_decl): Remove DECL_DEAD_FOR_LOCAL setting. * semantics.c (begin_for_scope): Always have a scope. (begin_for_stmt, finish_for_stmt): Remove ARM-for scope handling. (begin_range_for_stmt, finish_id_expression): Likewise. gcc/ * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope. * doc/extend.texi (Deprecated Features): Remove -fno-for-scope (Backwards Compatibility): Likewise. c-family/ * c.opt (ffor-scope): Remove functionality, issue warning. gcc/objcp/ * objcp-lang.c (objcxx_init_ts): Don't call init_shadowed_var_for_decl. gcc/testsuite/ * g++.dg/cpp0x/range-for10.C: Delete. * g++.dg/ext/forscope1.C: Delete. * g++.dg/ext/forscope2.C: Delete. * g++.dg/template/for1.C: Delete. From-SVN: r260015 --- gcc/objcp/ChangeLog | 8 ++++++-- gcc/objcp/objcp-lang.c | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/objcp') diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog index 3987f20..ec829b9 100644 --- a/gcc/objcp/ChangeLog +++ b/gcc/objcp/ChangeLog @@ -1,3 +1,7 @@ +2018-05-07 Nathan Sidwell + + * objcp-lang.c (objcxx_init_ts): Don't call init_shadowed_var_for_decl. + 2018-01-03 Jakub Jelinek Update copyright years. @@ -28,7 +32,7 @@ * objcp-decl.c: Remove unused header files. * objcp-lang.c: Likewise. - + 2015-10-29 Andrew MacLeod * objcp-decl.c: Reorder #include's and remove duplicates. @@ -43,7 +47,7 @@ * objcp-decl.c: Do not include input.h, line-map.h or is-a.h. * objcp-lang.c: Likewise. - + 2015-06-08 Andrew MacLeod * objcp-decl.c : Adjust include files. diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c index a301050..0372b60 100644 --- a/gcc/objcp/objcp-lang.c +++ b/gcc/objcp/objcp-lang.c @@ -87,8 +87,6 @@ objcxx_init_ts (void) { objc_common_init_ts (); cp_common_init_ts (); - - init_shadowed_var_for_decl (); } #include "gtype-objcp.h" -- cgit v1.1