From b1c8f01ae978448774a0c397b14d9f32cfe16731 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Thu, 14 Sep 1995 17:06:54 -0400 Subject: [PATCH] (do_identifier): Use global binding in preference of dead for local variable. From-SVN: r10352 --- gcc/cp/lex.c | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.7.4