https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79815
--- Comment #2 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:e7f0873a9c4ebccd078fc5330866efe0cd4c1309 commit r11-2202-ge7f0873a9c4ebccd078fc5330866efe0cd4c1309 Author: Marek Polacek <pola...@redhat.com> Date: Wed Jul 8 19:45:34 2020 -0400 c++: Diagnose cv-qualified decltype(auto) [PR79815] "If the placeholder is the decltype(auto) type-specifier, T shall be the placeholder alone." but we weren't detecting "const decltype(auto)". I've just expanded the existing diagnostic detecting "decltype(auto) &" and similar. gcc/cp/ChangeLog: PR c++/79815 * decl.c (grokdeclarator): Detect cv-qual decltype(auto). * pt.c (do_auto_deduction): Likewise. gcc/testsuite/ChangeLog: PR c++/79815 * g++.dg/cpp1y/auto-fn59.C: New test.