[Bug c++/80265] __builtin_{memcmp,memchr,strlen} are not usable in constexpr functions
palves at redhat dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 23 12:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80265
--- Comment #26 from Pedro Alves <palves at redhat dot com> ---
I'm confused then -- how does making __builtin_memcmp natively work on
constexpr contexts address the "but then we'd have *three* versions" concern?
Looking at the code, it does sound like you instead would want to
tweak __equal_aux to end up with __simple==false when all __equal_aux's
arguments are constant.
As for the inlining/unrolling concern, if the compiler fails to completely
optimize out an inline pure function where all its inputs are known constant,
then it sounds like something that we'd want to fix in the compiler,
regardless?
More information about the Gcc-bugs
mailing list