https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81042
Ralph Tandetzky <ralph.tandetzky at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ralph.tandetzky at gmail dot com --- Comment #4 from Ralph Tandetzky <ralph.tandetzky at gmail dot com> --- The following code: 1 constexpr int f() 2 { 3 for ( int i = 0; i < 1; ++i ) { 4 const int digit = i/1; 5 if( digit == 0 ) 6 continue; 7 for ( int j = 0; j < 0; ++j ) {} // <-- loop iteration count 8 // exceeds limit 9 } 10 return 0; 11 } 12 13 constexpr int i = f(); produces the following error with GCC 8.2: <source>:13:20: in 'constexpr' expansion of 'f()' <source>:7:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use -fconstexpr-loop-limit= to increase the limit) for ( int j = 0; j < 0; ++j ) {} ^~~