You could change this, but be careful about the
GHBIT optimization this figures out if this is a
rotate to the right or left .
> -----Original Message-----
> From: sdcc-devel-admin@...
> [mailto:sdcc-devel-admin@... Behalf Of Johan Knol
> Sent: Sunday, July 29, 2001 11:29 AM
> To: sdcc-devel@...
> Subject: [sdcc-devel] Re: sdcc-Bugs-443257 ] Replace AND with cast
> causes data loss
> > In the code
> > int leftShiftIntMasked3 (int v)
> > return ((v & 0xff) << 3);
> > }
> > (part of support/regression/bug-408972.c), v is cast
> > to a char instead of being anded. This char is then
> > shifted left by 3, causing the top three bits to be
> > dropped. The result is then cast up for the return.
> This happens in SDCCast.c:decorateType() line 2056. I don't
> see any reason
> why either a left or right literal should dictate the type.
> It is easy to
> change but there still may be a reason I don't see. Sandeep?
> sdcc-devel mailing list