https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70055

--- Comment #6 from Wilco <wdijkstr at arm dot com> ---
(In reply to Jakub Jelinek from comment #4)
> Note the choice of this in a header file is obviously wrong, if you at some
> point fix this up, then apps will still call memcpy rather than mempcpy,
> even when the latter is more efficient (because it doesn't have to save the
> length value in some location where it survives across the call).
> Note if you don't use the result of mempcpy, gcc is able to optimize it into
> memcpy, and tons of other optimizations.

It's highly unlikely that calling mempcpy would ever provide a performance
gain.

Reply via email to