Gcc builtin review: strcpy, stpcpy, strcat, stpcat?
Joseph Myers
joseph@codesourcery.com
Wed Jun 10 11:27:00 GMT 2015
On Wed, 10 Jun 2015, Wilco Dijkstra wrote:
> Yes, I think the optimization to convert strcpy into stpcpy would need
> to be done in a target specific way in GLIBC headers for targets where it
> makes sense. It's not something you could easily do in GCC as stpcpy is
> not a standard function. In general it is best to optimize to use simpler,
stpcpy is a POSIX function (and GCC of course can know about the semantics
of glibc functions, and generate calls if the conditions I described in
<https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00409.html> are satisfied -
and for that matter can know about the glibc exports of __stpcpy and use
that).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list