https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92224
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- It's undefined, so the implementation is not required to give an error. To quote the standard: Undefined behavior may be expected when this document omits any explicit definition of behavior or when a program uses an erroneous construct or erroneous data. Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).