[Bug c++/123091] `operator auto` should be rejected

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 16 18:05:13 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123091

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And not rejecting it unless -pedantic-errors is intentional, various sources in
the wild use operator auto, including libstdc++ before it got changed.
With the CWG in place, I think we don't need to try to get the behavior "right"
because it is invalid, so when we don't ICE we should keep existing behavior,
just avoid ICEs with it (and the ICEs can be resolved either with a sorry or
error or whatever else).


More information about the Gcc-bugs mailing list