This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80265] __builtin_{memcmp,memchr,strlen} are not usable in constexpr functions
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Apr 2017 20:59:07 +0000
- Subject: [Bug c++/80265] __builtin_{memcmp,memchr,strlen} are not usable in constexpr functions
- Auto-submitted: auto-generated
- References: <bug-80265-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80265
--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #13)
> it seems better than abusing __builtin_constant_p, which is getting
> contradictory requirements from its various uses:
> - constexpr (forces very early lowering)
I'm not sure what you mean here; constexpr specifically delays lowering within
a constexpr function until we're actually trying to evaluate to a constant
value.