https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98441
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:2f359597e49a15a2aef8f83ea7a14649854334cb commit r11-6531-g2f359597e49a15a2aef8f83ea7a14649854334cb Author: Marek Polacek <pola...@redhat.com> Date: Tue Jan 5 19:17:10 2021 -0500 c++: Fix thinko in auto return type checking [PR98441] This fixes a thinko in my r11-2085 patch: when I said "But only give the !late_return_type errors when funcdecl_p, to accept e.g. auto (*fp)() = f; in C++11" I should've done this, otherwise we give bogus errors mentioning "function with trailing return type" when there is none. gcc/cp/ChangeLog: PR c++/98441 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the !late_return_type block. gcc/testsuite/ChangeLog: PR c++/98441 * g++.dg/cpp0x/auto55.C: New test.