-fno-strict-aliasing in CWARNFLAGS?

Soeren Sandmann sandmann at daimi.au.dk
Wed Feb 3 17:28:01 PST 2010


Michael Cree <mcree at orcon.net.nz> writes:

> What I do see is that the variables a, r, g and b are essentially
> declared unsigned char (what I presume uint8_t is typedefed to) and a
> calculation is performed that will lose its intended result due to
> shifting an unsigned char more bits to the left than is available in
> the unsigned char.  

The variables are promoted to int before the shift takes place, so the
code works fine, apart from the aliasing issue.


Soren


More information about the xorg-devel mailing list