diff options
author | Per Bothner <bothner@kalessin.cygnus.com> | 1995-09-14 17:06:54 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-09-14 17:06:54 -0400 |
commit | b1c8f01ae978448774a0c397b14d9f32cfe16731 (patch) | |
tree | e232f134fce263fb1a5ea4004449c324543c69a8 | |
parent | 38267a708790cdbae9bcc70a193dc7c19629e78f (diff) | |
download | gcc-b1c8f01ae978448774a0c397b14d9f32cfe16731.zip gcc-b1c8f01ae978448774a0c397b14d9f32cfe16731.tar.gz gcc-b1c8f01ae978448774a0c397b14d9f32cfe16731.tar.bz2 |
(do_identifier): Use global binding in preference of dead for local
variable.
From-SVN: r10352
-rw-r--r-- | gcc/cp/lex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 2188570..c767349 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -2920,6 +2920,8 @@ do_identifier (token) if (TREE_CODE (id) == VAR_DECL && DECL_DEAD_FOR_LOCAL (id)) { tree shadowed = DECL_SHADOWED_FOR_VAR (id); + if (!shadowed) + shadowed = IDENTIFIER_GLOBAL_VALUE (DECL_NAME (id)); if (shadowed) { if (!DECL_ERROR_REPORTED (id)) |