fixed bug #456966
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 23 Sep 2001 16:09:12 +0000 (16:09 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 23 Sep 2001 16:09:12 +0000 (16:09 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1301 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglue.c
src/SDCCicode.c

index 4352a468388b973e5111c9ad8e4cf95bb9682641..68303f381c5203d6191bd3f718c7e21969761680 100644 (file)
@@ -186,6 +186,8 @@ emitRegularMap (memmap * map, bool addPublics, bool arFlag)
       /* if allocation required check is needed
          then check if the symbol really requires
          allocation only for local variables */
+      if (!sym->allocreq) continue;
+
       if (arFlag && !IS_AGGREGATE (sym->type) &&
          !(sym->_isparm && !IS_REGPARM (sym->etype)) &&
          !sym->allocreq && sym->level)
index ebb5e9523748fc6424a72bd94e355e07327ae7d9..0eaedcdd531a93c0f81f720bf5e4561f19e80992 100644 (file)
@@ -2498,6 +2498,9 @@ geniCodeAssign (operand * left, operand * right, int nosupdate)
      check if the literal value is within bounds */
   if (IS_INTEGRAL (ltype) && right->type == VALUE && IS_LITERAL (rtype))
     {
+      /* TODO: this won't warn for e.g. int = -12345678, or bit = -1
+        we need a checkConstant2Type(constVal,sym_link *)
+        also for send and return */
       int nbits = bitsForType (ltype);
       long v = (long) operandLitValue (right);