Re: C++: Difference between calling memcpy and __builtin_memcpy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/12/2016 04:55 AM, Florian Weimer wrote:
For the C++ compilers version which recognize memcpy, is there a
difference between calling memcpy via your own extern "C" declaration,
and calling __builtin_memcpy?

Except in freestanding mode (with builtins disabled) I don't believe
there is a difference.  They both get expanded the same way (either
inline or to a call to memcpy depending on arguments).

What about calling memcpy through a function which has a "memcpy" asm alias?

I'm not sure what asm alias you have in mind.  If attribute alias,
then In order to define one the aliased symbol must itself be defined
in the same translation unit as the alias.  That precludes defining
an alias for memcpy.

Martin



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux