aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-lang.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-05-07 23:04:22 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-05-07 23:04:22 +0000
commitee336e846de46aa5523a96f712d247c31a07c6e1 (patch)
tree8c66e81acd1034522f08d278a608f49f42e64ee3 /gcc/cp/cp-lang.c
parent1d473b8b9dd499a5e34d6a05d9ef2f4b521d1056 (diff)
downloadgcc-ee336e846de46aa5523a96f712d247c31a07c6e1.zip
gcc-ee336e846de46aa5523a96f712d247c31a07c6e1.tar.gz
gcc-ee336e846de46aa5523a96f712d247c31a07c6e1.tar.bz2
[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
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r--gcc/cp/cp-lang.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index 6007094..26a1e6d 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "cp-objcp-common.h"
enum c_language_kind c_language = clk_cxx;
-static void cp_init_ts (void);
static const char * cxx_dwarf_name (tree t, int verbosity);
static enum classify_record cp_classify_record (tree type);
static tree cp_eh_personality (void);
@@ -71,7 +70,7 @@ static tree cxx_enum_underlying_base_type (const_tree);
#undef LANG_HOOKS_DWARF_NAME
#define LANG_HOOKS_DWARF_NAME cxx_dwarf_name
#undef LANG_HOOKS_INIT_TS
-#define LANG_HOOKS_INIT_TS cp_init_ts
+#define LANG_HOOKS_INIT_TS cp_common_init_ts
#undef LANG_HOOKS_EH_PERSONALITY
#define LANG_HOOKS_EH_PERSONALITY cp_eh_personality
#undef LANG_HOOKS_EH_RUNTIME_TYPE
@@ -102,14 +101,6 @@ objcp_tsubst_copy_and_build (tree /*t*/,
return NULL_TREE;
}
-static void
-cp_init_ts (void)
-{
- cp_common_init_ts ();
-
- init_shadowed_var_for_decl ();
-}
-
static const char *
cxx_dwarf_name (tree t, int verbosity)
{