Comment 31 for bug 685352

Revision history for this message
Phillip Susi (psusi) wrote :

It looks to me like what it is doing is promoting the 255 to a signed short, which sign extends to 0xFFFF, then multiplying that by 0x0040 to get the 0xffc0 result. I think that this is allowed by the standard since the signedness of the literal 255 is undefined. Try adding adding a 'U' to the 255 to force it to unsigned.