From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C7533861834; Wed, 20 Dec 2023 17:41:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C7533861834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703094081; bh=yOr8XWIEvG9TytjI1Qik7jEBEt5Z8FFn1uywnwxIF+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hC4xVNXx8ekuVFp+Wl6QjEJepzLHd1UtRNzFp2tY1n2GvwQVJsY4w4f0tH4RNH2Ch tgG58gBzx6MdhEdWurkcjgneg9KjMP4TQLjg6SSzWEZn7dKriYPNaUxb54UmLLqb+S QFFd/E9anH5I3f/nZ/DvrC/ABlJiT5ZabQJJ9Nyk= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/92145] -Wdeprecated-copy false-positive when inheriting base assignment operators Date: Wed, 20 Dec 2023 17:41:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D92145 --- Comment #4 from GCC Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:f59cfce8ba6612c063a8f55267dc2caee7e0d381 commit r11-11163-gf59cfce8ba6612c063a8f55267dc2caee7e0d381 Author: Jason Merrill Date: Fri Apr 23 16:41:35 2021 -0400 c++: -Wdeprecated-copy and using operator=3D [PR92145] For the purpose of [depr.impldec] "if the class has a user-declared copy assignment operator", an operator=3D brought in from a base class with 'using' may be a copy-assignment operator, but it isn't a copy-assignment opera= tor for the derived class. gcc/cp/ChangeLog: PR c++/92145 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT of operator=3D. gcc/testsuite/ChangeLog: PR c++/92145 * g++.dg/cpp0x/depr-copy3.C: New test. (cherry picked from commit 37846c42f1f5ac4d9ba190d49c4373673c89c8b5)=