https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87389
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is ill-formed. if constexpr in main() doesn't work the way you want, because there's nothing dependent (there is no possible version of the code where the condition will be true, so the program is ill-formed).