On 01/10/2010 04:58 PM, Patrick Horgan wrote: > Andrew Haley wrote: >> On 01/10/2010 12:39 PM, Andreas Schwab wrote: >> >>> Andrew Haley <a...@redhat.com> writes: >>> >>>> Why do you say the effective type is different? >>>> >>> The object type is uint8_t, but accessed as uint32_t. That is >>> undefined. >> >> Unless uint8_t is a character type, as I understand it. That is >> clearly the assumption on which the code relies. >> > But in the new compilers it's an integer type, not a character > type--from the spec:
In which case this code is undefined, I agree. IMO it would be unwise for gcc not to treat uint8_t as a member of Alias Set 0, since doing so would break existing code (of which this is an excellent example) for no useful purpose. Andrew.