this shouldn't have been in cvs
[fw/sdcc] / src / SDCCmem.c
index a84bceffa89ce0b86145f8492f4894986bfaa057..4692be48e609842c9020b1e5f950311272e2c707 100644 (file)
@@ -420,7 +420,7 @@ allocParms (value * val)
     {
 
       /* check the declaration */
-      checkDecl (lval->sym);
+      checkDecl (lval->sym, 0);
 
       /* if this a register parm then allocate
          it as a local variable by adding it
@@ -582,35 +582,27 @@ allocLocal (symbol * sym)
   /* this is automatic           */
 
   /* if it to be placed on the stack */
-  if (options.stackAuto || reentrant)
-    {
-
-      sym->onStack = 1;
-      if (options.useXstack)
-       {
-         /* PENDING: stack direction for xstack */
-         SPEC_OCLS (sym->etype) = xstack;
-         SPEC_STAK (sym->etype) = sym->stack = (xstackPtr + 1);
-         xstackPtr += getSize (sym->type);
-       }
-      else
-       {
-         SPEC_OCLS (sym->etype) = istack;
-         if (port->stack.direction > 0)
-           {
-             SPEC_STAK (sym->etype) = sym->stack = (stackPtr + 1);
-             stackPtr += getSize (sym->type);
-           }
-         else
-           {
-             stackPtr -= getSize (sym->type);
-             SPEC_STAK (sym->etype) = sym->stack = stackPtr;
-           }
-       }
-      allocIntoSeg (sym);
-      return;
+  if (options.stackAuto || reentrant) {
+    sym->onStack = 1;
+    if (options.useXstack) {
+      /* PENDING: stack direction for xstack */
+      SPEC_OCLS (sym->etype) = xstack;
+      SPEC_STAK (sym->etype) = sym->stack = (xstackPtr + 1);
+      xstackPtr += getSize (sym->type);
+    } else {
+      SPEC_OCLS (sym->etype) = istack;
+      if (port->stack.direction > 0) {
+       SPEC_STAK (sym->etype) = sym->stack = (stackPtr + 1);
+       stackPtr += getSize (sym->type);
+      } else {
+       stackPtr -= getSize (sym->type);
+       SPEC_STAK (sym->etype) = sym->stack = stackPtr;
+      }
     }
-
+    allocIntoSeg (sym);
+    return;
+  }
+  
   /* else depending on the storage class specified */
   if (SPEC_SCLS (sym->etype) == S_XDATA)
     {
@@ -801,7 +793,7 @@ allocVariables (symbol * symChain)
        csym = sym;
 
       /* check the declaration */
-      checkDecl (csym);
+      checkDecl (csym,0);
 
       /* if this is a function or a pointer to function */
       /* then args  processing  */
@@ -938,7 +930,7 @@ redoStackOffsets (void)
 
   /* if the debug option is set then output the
      symbols to the map file */
-  if (options.debug && !options.nodebug)
+  if (options.debug)
     {
       for (sym = setFirstItem (istack->syms); sym;
           sym = setNextItem (istack->syms))