From 92ee91cb4a8a8d3c76e71fd20522ab13f8faab23 Mon Sep 17 00:00:00 2001 From: johanknol Date: Fri, 23 Nov 2001 19:45:14 +0000 Subject: [PATCH] temporary disabled checkConstantRange, left a warning as a reminder git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1631 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCicode.c | 5 ++++- src/SDCCval.c | 12 +----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 6d0f16ed..e3781a7f 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -126,7 +126,8 @@ iCodeTable codeTable[] = pedantic>1: "char c=200" is not allowed (evaluates to -56) */ -void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) { +void checkConstantRange(sym_link *ltype, value *val, char *msg, + int pedantic) { double max; char message[132]=""; int warnings=0; @@ -178,6 +179,7 @@ void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) { warnings++; } +#if 0 // temporary disabled, leaving the warning as a reminder if (warnings) { sprintf (message, "for %s %s in %s", SPEC_USIGN(ltype) ? "unsigned" : "signed", @@ -187,6 +189,7 @@ void checkConstantRange(sym_link *ltype, value *val, char *msg, int pedantic) { if (pedantic>1) fatalError++; } +#endif } /*-----------------------------------------------------------------*/ diff --git a/src/SDCCval.c b/src/SDCCval.c index ad57890f..86de5525 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -348,10 +348,9 @@ value *cheapestVal (value *val) { if (sval<0) { if (sval>=-32768) { SPEC_LONG(val->type)=0; - SPEC_CVAL(val->type).v_int = sval & 0xffff; + SPEC_CVAL(val->type).v_int = sval; if (sval>=-128) { SPEC_NOUN(val->type)=V_CHAR; - SPEC_CVAL(val->type).v_int &= 0xff; } } } else { // sval>=0 @@ -948,9 +947,6 @@ valComplement (value * val) SPEC_CVAL (val->etype).v_uint = ~SPEC_CVAL (val->etype).v_uint; else SPEC_CVAL (val->etype).v_int = ~SPEC_CVAL (val->etype).v_int; - if (SPEC_NOUN (val->etype)==V_CHAR) { - SPEC_CVAL (val->etype).v_uint &= 0xff; - } } return val; } @@ -975,9 +971,6 @@ valNot (value * val) SPEC_CVAL (val->etype).v_uint = !SPEC_CVAL (val->etype).v_uint; else SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_int; - if (SPEC_NOUN (val->etype)==V_CHAR) { - SPEC_CVAL (val->etype).v_uint &= 0xff; - } } return val; } @@ -1423,9 +1416,6 @@ valCastLiteral (sym_link * dtype, double fval) SPEC_CVAL (val->etype).v_uint = (unsigned short)l; else SPEC_CVAL (val->etype).v_int = (short)l; - if (SPEC_NOUN (val->etype)==V_CHAR) { - SPEC_CVAL (val->etype).v_uint &= 0xff; - } } } return val; -- 2.47.2