From: johanknol Date: Wed, 26 Mar 2003 08:25:37 +0000 (+0000) Subject: a better fix for "if ( -v < 3)" X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=cdae6026cb043cca2dc8daf8dc9ff67899e32736;p=fw%2Fsdcc a better fix for "if ( -v < 3)" git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2417 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index 51b016fd..644d8fb3 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -2563,7 +2563,7 @@ decorateType (ast * tree) return tree; } LRVAL (tree) = 1; - TTYPE (tree) = LTYPE (tree); + TETYPE(tree) = getSpec (TTYPE (tree) = LTYPE (tree)); return tree; } @@ -2930,8 +2930,7 @@ decorateType (ast * tree) } /* if unsigned value < 0 then always false */ /* if (unsigned value) > 0 then (unsigned value) */ - if (LETYPE(tree) && SPEC_USIGN(LETYPE(tree)) && - RTYPE(tree) && IS_LITERAL(RTYPE(tree)) && + if (SPEC_USIGN(LETYPE(tree)) && IS_LITERAL(RTYPE(tree)) && ((int) floatFromVal (valFromType (RETYPE (tree)))) == 0) { if (tree->opval.op == '<') {