On Sep 8, 2009, at 1:16 PM, Mike Stump wrote:

> On Sep 8, 2009, at 12:57 PM, Douglas Gregor wrote:
>> Make sure to access APValue's data via a char array (rather than
>> through an array of void*), so that we don't run afoul of the
>> strict-aliasing rules in C++ 3.10p15.
>
>> Unfortunately, GCC 4.4 still complains about this code.
>
>> -    return *(APSInt*)(void*)Data;
>> +    return *(APSInt*)(char*)Data;
>
> This doesn't match your description.  If you think this access is  
> through a char to ensure this conforms to the standard...  I'd be  
> happy to give you the aliasing rules class...  This is an access  
> through a type of APSInt, which is unrelated to char.


Where do I enroll?

Alternatively, do you see how to eliminate the strict-aliasing  
violations in APValue? I'm clearly missing something.

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to