https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118718
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:53d1f6cdb5a82e859176e854636400faba0bf0bf commit r15-7354-g53d1f6cdb5a82e859176e854636400faba0bf0bf Author: Marek Polacek <pola...@redhat.com> Date: Fri Jan 31 14:52:36 2025 -0500 c++: bogus -Wvexing-parse with trailing-return-type [PR118718] This warning should not warn for auto f1 () -> auto; because that cannot be confused with initializing a variable. PR c++/118718 gcc/cp/ChangeLog: * parser.cc (warn_about_ambiguous_parse): Don't warn when a trailing return type is present. gcc/testsuite/ChangeLog: * g++.dg/warn/Wvexing-parse10.C: New test. Reviewed-by: Jason Merrill <ja...@redhat.com>