https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63278
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- typedef __SIZE_TYPE__ size_t; inline constexpr size_t hashString(const char* str, size_t hash = 5381) { return (*str) ? hashString(str + 1, hash + (hash << 5) + *str) : hash; } constexpr size_t c = hashString("foo"); works just fine, so I think we're talking here about optimization (should e.g. cp gimplification or genericization at -O+ for constexpr functions if all arguments are const/constexpr try maybe_constant_value?