https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100068
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |diagnostic
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
On second thought, and after reading what C and C++ say about noreturn, I don't
think it's wrong to emit just one call to either g0() or g1() in the test case.
C in particular specifies that:
A function declared with a _Noreturn function specifier shall not return to
its caller.
so declaring a function _Noreturn once is enough to grant the permission to
eliminate subsequent code regardless of any intervening redeclarations of the
function. Let me change the Keywords from wrong-code to missing diagnostic.