is portable aliasing possible in C++?
Andrew Haley
aph@redhat.com
Mon Sep 15 11:32:00 GMT 2014
On 09/15/2014 12:29 PM, Hei Chan wrote:
>
>
>
>
>
> On Monday, September 15, 2014 7:22 PM, Andrew Haley <aph@redhat.com> wrote:
>
>> Using memcpy(), the compiler will have to make a copy
>> because it sees that few lines, for example, down, the program tries
>> to manipulate the copy.
>
> So, don't manipulate the copy, then. Use it once, then throw it away.
>
> Sometimes, due to the endianness, I am forced to manipulate the copy...
I don't know what you mean. A small example would help.
Andrew.
More information about the Gcc-help
mailing list