[Bug c++/90784] A loop inside a constexpr function in a constexpr context is not evaluated at compile time

ensadc at mailnesia dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 8 10:05:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90784

--- Comment #2 from ensadc at mailnesia dot com ---
But curiously, gcc does replace the loop with the constant if `#undef
_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED` is added before `#include
<string>`: https://godbolt.org/z/mVdLVP . (Why) is
`__builtin_is_constant_evaluated` pessimizing?


More information about the Gcc-bugs mailing list