From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 052CF3857710; Tue, 25 Jul 2023 12:51:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 052CF3857710 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690289516; bh=+2p0iKMc8KoJaAuQcy9RQLmGqOc95vluNTDlFuUCbqI=; h=From:To:Subject:Date:From; b=bM8WKl+RaObS4r9qrlxjU/9eSraFY1KBzeOBnwuMnMjxdrIGtiIcj/QalxmXHO5nw lZ+DnpEY11hKrlxrLfx8d2GJh1Vl8onYxNT1q2S/p7qG2OP+UCLFsEkdWnhldjxpcE KYARh0LBTVb9S7phs/hvpvNixMVa3J57PajI4eAE= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110802] New: Missing warning for attribute deprecated on a function template definition with a previous declaration Date: Tue, 25 Jul 2023 12:51:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110802 Bug ID: 110802 Summary: Missing warning for attribute deprecated on a function template definition with a previous declaration Product: gcc Version: 13.1.1 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- template void random_shuffle(RAIter, RAIter); template __attribute__ ((deprecated)) void random_shuffle(RAIter, RAIter) { } int main() { int* p =3D 0; random_shuffle(p, p); } This is based on std::random_shuffle in libstdc++, which I noticed warns wi= th Clang but not with GCC. I added the attribute in r12-2700-g7f2f4b87910506 but it's never warned with GCC. This doesn't seem to be a regression, as GCC 4.1.2 doesn't warn either= .=