https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101106
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:2348a458e156641c5d4b0e998ae0d175196cfd51 commit r11-8629-g2348a458e156641c5d4b0e998ae0d175196cfd51 Author: Jason Merrill <ja...@redhat.com> Date: Thu Jun 17 15:31:15 2021 -0400 c++: deleted after first declaration [PR101106] An explicitly deleted function must be deleted on its first declaration. We were diagnosing this error only with -Wpedantic, but always giving the "previous declaration" note. For GCC 11, keep the -Wpedantic dependency, just make the note depend on the previous diagnostic. PR c++/101106 gcc/cp/ChangeLog: * decl.c (duplicate_decls): Condition note on return value of pedwarn. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/deleted15.C: New test.