From 0edf3afe139a9860ef530c9999841863e96e37e4 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 2 Oct 2018 10:08:22 +0000 Subject: [PATCH] c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE. 2018-10-02 Richard Biener c/ * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE. cp/ * name-lookup.c (check_local_shadow): Do not test DECL_FROM_INLINE. From-SVN: r264779 --- gcc/c/ChangeLog | 4 ++++ gcc/c/c-decl.c | 4 +--- gcc/cp/ChangeLog | 4 ++++ gcc/cp/name-lookup.c | 4 ---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index a8e235c9f9b..720aadcd0ea 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,7 @@ +2018-10-02 Richard Biener + + * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE. + 2018-09-26 Joseph Myers PR c/87390 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index fdcfbde2d99..160ce357cb1 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -2784,9 +2784,7 @@ warn_if_shadowing (tree new_decl) || warn_shadow_local || warn_shadow_compatible_local) /* No shadow warnings for internally generated vars. */ - || DECL_IS_BUILTIN (new_decl) - /* No shadow warnings for vars made for inlining. */ - || DECL_FROM_INLINE (new_decl)) + || DECL_IS_BUILTIN (new_decl)) return; /* Is anything being shadowed? Invisible decls do not count. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e10ada2d7b6..fd0fb8a720a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2018-10-02 Richard Biener + + * name-lookup.c (check_local_shadow): Do not test DECL_FROM_INLINE. + 2018-09-28 Eric Botcazou Pierre-Marie de Rodat diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 95d2845dd91..08632c382b7 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2628,10 +2628,6 @@ check_local_shadow (tree decl) if (TREE_CODE (decl) == PARM_DECL && !DECL_CONTEXT (decl)) return; - /* Inline decls shadow nothing. */ - if (DECL_FROM_INLINE (decl)) - return; - /* External decls are something else. */ if (DECL_EXTERNAL (decl)) return; -- 2.30.2