From: johanknol Date: Thu, 28 Mar 2002 10:45:52 +0000 (+0000) Subject: fixed bug #532436 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=3b794e7f72ba665b89722cc63906ba6f72449781;p=fw%2Fsdcc fixed bug #532436 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2004 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCval.c b/src/SDCCval.c index 02172a72..72c73a18 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -946,6 +946,12 @@ valUnaryPM (value * val) } // -(unsigned 3) now really is signed SPEC_USIGN(val->etype)=0; + // -(unsigned char)135 now really is an int + if (SPEC_NOUN(val->etype) == V_CHAR) { + if (SPEC_CVAL(val->etype).v_int < -128) { + SPEC_NOUN(val->etype) = V_INT; + } + } return val; }