- {
- if (SPEC_USIGN (val->type))
- SPEC_CVAL (val->type).v_ulong = (unsigned long) floatFromVal (lval) *
- (unsigned long) floatFromVal (rval);
- else
- SPEC_CVAL (val->type).v_long = (long) floatFromVal (lval) *
- (long) floatFromVal (rval);
- }
- else
- {
- if (SPEC_USIGN (val->type))
- SPEC_CVAL (val->type).v_uint = (unsigned) floatFromVal (lval) *
- (unsigned) floatFromVal (rval);
- else
- SPEC_CVAL (val->type).v_int = (int) floatFromVal (lval) *
- (int) floatFromVal (rval);
- }
+ SPEC_CVAL (val->type).v_ulong = (TYPE_UDWORD) floatFromVal (lval) *
+ (TYPE_UDWORD) floatFromVal (rval);
+ else /* int */
+ {
+ TYPE_UDWORD ul = (TYPE_UWORD) floatFromVal (lval) *
+ (TYPE_UWORD) floatFromVal (rval);
+
+ SPEC_CVAL (val->type).v_uint = (TYPE_UWORD) ul;
+ if (!options.lessPedantic)
+ {
+ if (SPEC_USIGN (val->type))
+ {
+ if (ul != SPEC_CVAL (val->type).v_uint)
+ werror (W_INT_OVL);
+ }
+ else /* signed result */
+ {
+ TYPE_DWORD l = (TYPE_WORD) floatFromVal (lval) *
+ (TYPE_WORD) floatFromVal (rval);
+
+ if (l != SPEC_CVAL (val->type).v_int)
+ werror (W_INT_OVL);
+ }
+ }
+ }