This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Aliasing bug


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?


Anyway, I see that the glibc code has, in fact, already been fixed here: http://sourceware.org/ml/libc-alpha/2008-11/msg00004.html

Thank you.

Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]