https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116160
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-07-31 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks like this was a defect in the standard at one point and now it is acepted and GCC just didn't implement the defect. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#36 https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2663 >From DR 36: [Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.] So yes it is valid code after all; just was not until 2021 :).