* src/SDCCsymt.h: added IS_AUTO(symbol) test macro
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 14 May 2004 21:04:19 +0000 (21:04 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 14 May 2004 21:04:19 +0000 (21:04 +0000)
* src/SDCCopt.c (isLocalWithoutDef),
* src/SDCCicode.c (operandFromSymbol): use the IS_AUTO test macro
which adds a !IS_EXTERN codition. Fixes bugs #877426 and #751703.
(credit to Maarten Brock for patch #949363, on which this is based)
* support/regression/tests/bug-751703.c: some test cases of extern used
within inner scopes.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3308 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCopt.c

index e39db1b264f7d26250964a1463eeabb573ffc8a1..93668913bfebe1ee4448c2ae94ea30d6001c9bb2 100644 (file)
@@ -613,13 +613,7 @@ isLocalWithoutDef (symbol * sym)
 {
   if (!IS_AUTO (sym))
     return 0;
-  #if 0
-  if (!sym->level)
-    return 0;
   
-  if (IS_STATIC (sym->etype))
-    return 0;
-  #endif
   if (IS_VOLATILE (sym->type))
     return 0;