https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120335
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Defining a function return |Defining a function return |type allowed with |type allowed with |-pedantic-errors |-pedantic-errors with using | |statement Ever confirmed|0 |1 Last reconfirmed| |2025-05-18 Known to fail| |4.7.1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Looks like GCC has incorrectly accepted this ever since the support for using type aliases back in GCC 4.7.0. GCC does reject defining a new type as the return type with typedef and when declaring a function. So it looks like an oversight here even.