Linux and aliasing?

mark@codesourcery.com mark@codesourcery.com
Sat Jun 5 11:00:00 GMT 1999


>>>>> "Linus" == Linus Torvalds <torvalds@transmeta.com> writes:

    Linus>  - "char *" - which is just unbearably slow, and obviously
    Linus> not really an option for many things. You're better off
    Linus> just disabling the alias logic altogether.

Not really always true.  You can use `memcpy (target, src, sizeof
(x))' and if the alignments of the src and target are known to the
compiler you *should* get optimal code.  (I don't know if GCC does
this at present, but it could, and that would clearly be a good
improvement.)

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc mailing list