]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCsymt.c
fixed bug #463839
[fw/sdcc] / src / SDCCsymt.c
index 97634105617769ecf20aeada191e8234d3126715..7164549b792881d7cc9ad45c2dc1d1cfc554dc16 100644 (file)
@@ -217,13 +217,12 @@ findSymWithLevel (bucket ** stab, symbol * sym)
    **/
   while (bp)
     {
-
       if (strcmp (bp->name, sym->name) == 0 && bp->level <= sym->level)
        {
          /* if this is parameter then nothing else need to be checked */
          if (((symbol *) (bp->sym))->_isparm)
            return (bp->sym);
-         /* if levels match then block numbers hsould also match */
+         /* if levels match then block numbers should also match */
          if (bp->level && bp->level == sym->level && bp->block == sym->block)
            return (bp->sym);
          /* if levels don't match then we are okay */
@@ -957,7 +956,7 @@ addSymChain (symbol * symHead)
          then check if the type match, if the types match then
          delete the current entry and add the new entry      */
       if ((csym = findSymWithLevel (SymbolTab, sym)) &&
-         csym->level == sym->level) {
+         csym->level == sym->level && csym->localof == sym->localof) {
        
        /* one definition extern ? */
        if (IS_EXTERN (csym->etype) || IS_EXTERN (sym->etype)) {
@@ -2278,6 +2277,11 @@ initCSupport ()
 
   int bwd, su, muldivmod, tofrom, rlrr;
 
+  if (getenv("SDCC_NO_C_SUPPORT")) {
+    /* for debugging only */
+    return;
+  }
+
   floatType = newFloatLink ();
 
   for (bwd = 0; bwd < 3; bwd++)