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;
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",
if (pedantic>1)
fatalError++;
}
+#endif
}
/*-----------------------------------------------------------------*/
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
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;
}
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;
}
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;