https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101106
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:331e20a69be0d9e7d448580945945d4c7a1e3c0a commit r12-1602-g331e20a69be0d9e7d448580945945d4c7a1e3c0a 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. This patch removes the -Wpedantic dependency and also makes the note depend on the previous diagnostic. PR c++/101106 gcc/cp/ChangeLog: * decl.c (duplicate_decls): Make 'deleted after first declaration' pedwarn on by default. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/deleted15.C: New test.