https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81042
Valentine <v at vsamko dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |v at vsamko dot com --- Comment #3 from Valentine <v at vsamko dot com> --- I'm having the same problem with gcc 7.2. Clang handles this correctly. constexpr int gcc_bug() { for (unsigned int i = 0; i != 1; ++i) { continue; int q = 0; while (q == -1) {} } return 0; } int main() { constexpr int x = gcc_bug(); }