>>>>> "Andrew" == Andrew Pinski <[EMAIL PROTECTED]> writes:

 >> Yes, this is a compiler bug in the expansion of memcpy, please
 >> file a bug report.  The solution is for the compiler to notice the
 >> memory alignment of the destination and `do-the-right-thing' when
 >> it isn't aligned.

 Andrew> No it is not, once you take the address (which should be
 Andrew> rejected), it is of type "unsigned int *" and not unaligned
 Andrew> variable, passing it to memcpy assumes the type alignment is
 Andrew> the natural alignment.

That seems like a misfeature.

It sounds like the workaround is to avoid memcpy, and just use
variable assignment.  Alternatively, cast the pointers to char*, which
should force memcpy to do the right thing.  Ugh.

       paul

Reply via email to