public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-92145-4-WwJo6AvCRz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-92145-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92145

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:f59cfce8ba6612c063a8f55267dc2caee7e0d381

commit r11-11163-gf59cfce8ba6612c063a8f55267dc2caee7e0d381
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Apr 23 16:41:35 2021 -0400

    c++: -Wdeprecated-copy and using operator= [PR92145]

    For the purpose of [depr.impldec] "if the class has a user-declared copy
    assignment operator", an operator= brought in from a base class with
'using'
    may be a copy-assignment operator, but it isn't a copy-assignment operator
    for the derived class.

    gcc/cp/ChangeLog:

            PR c++/92145
            * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
            of operator=.

    gcc/testsuite/ChangeLog:

            PR c++/92145
            * g++.dg/cpp0x/depr-copy3.C: New test.

    (cherry picked from commit 37846c42f1f5ac4d9ba190d49c4373673c89c8b5)

  parent reply	other threads:[~2023-12-20 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-92145-4@http.gcc.gnu.org/bugzilla/>
2021-04-23 20:40 ` jason at gcc dot gnu.org
2021-04-27 19:44 ` cvs-commit at gcc dot gnu.org
2021-11-23  1:05 ` mpolacek at gcc dot gnu.org
2021-11-24 13:59 ` nok.raven at gmail dot com
2023-12-20 17:41 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-20 17:42 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-92145-4-WwJo6AvCRz@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).