On Fri, Sep 17, 2021 at 9:27 AM Florian Weimer via Libc-alpha <
libc-al...@sourceware.org> wrote:

> * Joseph Myers:
>
> > I was supposing a build-time decision (using
> GCC_GLIBC_VERSION_GTE_IFELSE
> > to know if the glibc version on the target definitely has this
> function).
> > But if we add a header declaration, you could check for __memcmpeq being
> > declared (and so cover arbitrary C libraries, not just glibc, and avoid
> > issues of needing to disable this logic for freestanding compilations,
> > which would otherwise be an issue if a glibc-target toolchain is used
> for
> > a freestanding kernel compilation).  The case of people calling
> > __builtin_memcmp (or declaring memcmp themselves) without string.h
> > included probably isn't one it's important to optimize.
>
> The header-less case looks relevant to C++ and other language front
> ends, though.  So a GCC_GLIBC_VERSION_GTE_IFELSE check could still make
> sense for them.
>
> (Dropping libc-coord.)
>
> Thanks,
> Florian
>
>
What are we going with?

Should I go forward with the proposal in GLIBC?

If I should go forward with it should I include a def in string.h?

Reply via email to