diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-05-03 19:26:38 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-05-03 19:26:38 +0000 |
commit | 6c072e217f59a92136af99839ff7cab9065a4fa0 (patch) | |
tree | c1a46ca2286357bf1cd6337b1fd1a6c1d41c0f4e /gcc/cp | |
parent | 503ac4e037217724c3c8d5468fb757ec398e8077 (diff) | |
download | gcc-6c072e217f59a92136af99839ff7cab9065a4fa0.zip gcc-6c072e217f59a92136af99839ff7cab9065a4fa0.tar.gz gcc-6c072e217f59a92136af99839ff7cab9065a4fa0.tar.bz2 |
[C++ Patch] Kill -ffriend-injection
https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00175.html
* doc/extend.texi (Deprecated Features): Remove
-ffriend-injection.
(Backwards Compatibility): Likewise.
* doc/invoke.texi (C++ Language Options): Likewise.
(C++ Dialect Options): Likewise.
c-family/
* c.opt (ffriend-injection): Remove functionality, issue warning.
cp/
* decl.c (cxx_init_decl_processing): Remove flag_friend_injection.
* name-lookup.c (do_pushdecl): Likewise.
testsuite/
Remove -ffriend-injection.
* g++.old-deja/g++.jason/scoping15.C: Delete.
* g++.old-deja/g++.mike/net43.C: Delete.
From-SVN: r259904
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 11 |
3 files changed, 7 insertions, 12 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fadcea8..25cb43a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2018-05-03 Nathan Sidwell <nathan@acm.org> + + * decl.c (cxx_init_decl_processing): Remove flag_friend_injection. + * name-lookup.c (do_pushdecl): Likewise. + 2018-05-02 Paolo Carlini <paolo.carlini@oracle.com> Jason Merrill <jason@redhat.com> diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6f2fe01..5e67181 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4175,9 +4175,6 @@ cxx_init_decl_processing (void) if (!flag_new_for_scope) warning_at (UNKNOWN_LOCATION, OPT_Wdeprecated, "%<-fno-for-scope%> is deprecated"); - if (flag_friend_injection) - warning_at (UNKNOWN_LOCATION, OPT_Wdeprecated, - "%<-ffriend-injection%> is deprecated"); c_common_nodes_and_builtins (); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 08cabd6..9710add 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -3055,7 +3055,6 @@ do_pushdecl (tree decl, bool is_friend) old = OVL_CHAIN (old); check_template_shadow (decl); - bool visible_injection = false; if (DECL_DECLARES_FUNCTION_P (decl)) { @@ -3073,11 +3072,8 @@ do_pushdecl (tree decl, bool is_friend) /* Don't attempt to push it. */ return error_mark_node; } - if (!flag_friend_injection) - /* Hide it from ordinary lookup. */ - DECL_ANTICIPATED (decl) = DECL_HIDDEN_FRIEND_P (decl) = true; - else - visible_injection = true; + /* Hide it from ordinary lookup. */ + DECL_ANTICIPATED (decl) = DECL_HIDDEN_FRIEND_P (decl) = true; } } @@ -3129,9 +3125,6 @@ do_pushdecl (tree decl, bool is_friend) } else if (VAR_P (decl)) maybe_register_incomplete_var (decl); - else if (visible_injection) - warning (0, "injected friend %qD is visible" - " due to %<-ffriend-injection%>", decl); if ((VAR_P (decl) || TREE_CODE (decl) == FUNCTION_DECL) && DECL_EXTERN_C_P (decl)) |