https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82304
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-09-25 00:00:00 |2019-11-28 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: constexpr const char* testfunc(const char* p) { auto l = reinterpret_cast<unsigned long long>(p); ++l return reinterpret_cast<const char*>(l); } constexpr auto s = testfunc("Hello"); I assume the problem here and in Bug 92411 is that the compiler is folding the casts away.