From: johanknol Date: Sun, 23 Sep 2001 16:09:12 +0000 (+0000) Subject: fixed bug #456966 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5590d3c1d329fc2bac2d698f9abfde171bf443be;p=fw%2Fsdcc fixed bug #456966 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1301 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 4352a468..68303f38 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -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) diff --git a/src/SDCCicode.c b/src/SDCCicode.c index ebb5e952..0eaedcdd 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -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);