Missing optimization: mempcpy(3) vs memcpy(3)

Jakub Jelinek jakub@redhat.com
Mon Dec 12 16:09:59 GMT 2022


On Mon, Dec 12, 2022 at 04:56:27PM +0100, Alejandro Colomar wrote:
> "Names beginning with ‘str’, ‘mem’, or ‘wcs’ followed by a lowercase letter
> are reserved for additional string and array functions. See String and Array
> Utilities."

It is not that simple.
mem*, str* and wcs* are just potentially reserved identifiers, they are only
reserved if the implementation provided them.  And what we discuss here
is how to reliably find out if it was an implementation that provided them,
because in case of gcc the implementation is GCC and the C library and
perhaps some other libraries too.
gcc can be used with lots of different C libraries, and many don't implement
mempcpy.

	Jakub



More information about the Gcc mailing list