https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115784
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks for filing this bug report. The analyzer reports -Wanalyzer-infinite-loop on the example code you posted; trunk on Compiler Explorer: https://godbolt.org/z/WzPEc3hxh But it is indeed an infinite loop, so it's arguably a true positive. It sounds like you want the warning to be suppressed in "noreturn" functions (perhaps with some kind of heuristic???) Do you have an example of real-world code that runs into this?