* support/Util/SDCCerr: reworded E_AUTO_ASSUMED diagnostic to clarify
that the variable, not the function, should be static
* src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
to be consistent with non-literal case
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3321
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2004-05-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/SDCCopt.c (killDeadCode): fixed bug #907733
+ * support/Util/SDCCerr.c: reworded E_AUTO_ASSUMED diagnostic to clarify
+ that the variable, not the function, should be static
+ * src/SDCCval.c (valCastLiteral): fixed bit initialization from literal
+ to be consistent with non-literal case
+
2004-05-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
* src/SDCCast.c (isConformingBody): fixed bug #949967
if (IC_RESULT (ic) && POINTER_SET (ic))
continue;
- if (POINTER_GET (ic) && IS_VOLATILE (operandType (IC_LEFT (ic))->next))
+ if (POINTER_GET (ic) && IS_VOLATILE (operandType (IC_LEFT (ic))->next)
+ && !SPIL_LOC (IC_RESULT (ic)))
continue;
/* if the result is used in the remainder of the */
volRight = FALSE;
}
+ if (POINTER_GET (ic) && IS_VOLATILE (operandType (IC_LEFT (ic))->next))
+ {
+ if (SPIL_LOC (IC_RESULT (ic)))
+ {
+ IC_RESULT (ic) = newiTempFromOp (IC_RESULT (ic));
+ SPIL_LOC (IC_RESULT (ic)) = NULL;
+ }
+ continue;
+ }
+
change = 1;
gchange++;
SPEC_CVAL (val->etype).v_float = fval;
else if (SPEC_NOUN (val->etype) == V_BIT ||
SPEC_NOUN (val->etype) == V_SBIT)
- SPEC_CVAL (val->etype).v_uint = l & 1;
+ SPEC_CVAL (val->etype).v_uint = l ? 1 : 0;
else if (SPEC_NOUN (val->etype) == V_BITFIELD)
SPEC_CVAL (val->etype).v_uint = l &
(0xffffu >> (16 - SPEC_BLEN (val->etype)));
{ W_INIT_IGNORED, ERROR_LEVEL_WARNING,
"Variable in the storage class cannot be initialized.'%s'" },
{ E_AUTO_ASSUMED, ERROR_LEVEL_ERROR,
- "storage class not allowed for automatic variable '%s' in reentrant function unless static" },
+ "variable '%s' must be static to have storage class in reentrant function" },
{ E_AUTO_ABSA, ERROR_LEVEL_ERROR,
"absolute address not allowed for automatic var '%s' in reentrant function " },
{ W_INIT_WRONG, ERROR_LEVEL_WARNING,