https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104994
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Ville says that P2242 did not intend to add new restrictions, so this was valid in C++20, and should still be valid in C++23 even if control flow passes over that non-local declaration. We might have a defect in the current draft, because it seems to forbid it.