This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing bug
On Thu, Jul 2, 2009 at 3:46 PM, Andrew Stubbs<ams@codesourcery.com> wrote:
> On 02/07/09 14:34, Richard Guenther wrote:
>>
>> No, that's invalid. ?You would have to do
>>
>> extern union {
>> ? void *foo;
>> ? short *bar;
>> };
>>
>> using the union for the double-indirect pointer doesn't help. ?Or
>> simply use memcpy to store to foo.
>
> Ah, I did not know that. I still don't understand how a reference to a
> memory location that happens to contain a pointer is different to one what
> contains other data?
It is not different.
> Anyway, I see that the glibc code has, in fact, already been fixed here:
> http://sourceware.org/ml/libc-alpha/2008-11/msg00004.html
Great.
Richard.
> Thank you.
>
> Andrew
>