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++/92752] [10/11 Regression] Bogus "ignored qualifiers" warning on const-qualified pointer-to-member-function objects
Date: Mon, 22 May 2023 03:11:57 +0000	[thread overview]
Message-ID: <bug-92752-4-FlZM5AcHQP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-92752-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

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

commit r11-10799-gd0a586ba9d9bd44d5e4d523ed2326bd6639493d8
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Jan 28 15:41:15 2022 -0500

    c++: bogus warning with value init of const pmf [PR92752]

    Here we're emitting a -Wignored-qualifiers warning for an intermediate
    compiler-generated cast of nullptr to 'method-type* const' as part of
    value initialization of a const pmf.  This patch suppresses the warning
    by instead casting to the corresponding unqualified type.

            PR c++/92752

    gcc/cp/ChangeLog:

            * typeck.c (build_ptrmemfunc): Cast a nullptr constant to the
            unqualified pointer type not the qualified one.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wignored-qualifiers2.C: New test.

    Co-authored-by: Jason Merrill <jason@redhat.com>
    (cherry picked from commit e971990cbda091b4caf5e1a5bded5121068934e4)

  parent reply	other threads:[~2023-05-22  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-92752-4@http.gcc.gnu.org/bugzilla/>
2021-06-18 18:07 ` [Bug c++/92752] [9/10/11/12 " ppalka at gcc dot gnu.org
2022-01-21 13:44 ` rguenth at gcc dot gnu.org
2022-01-28 16:21 ` ppalka at gcc dot gnu.org
2022-01-28 20:41 ` cvs-commit at gcc dot gnu.org
2022-01-28 20:41 ` [Bug c++/92752] [9/10/11 " ppalka at gcc dot gnu.org
2022-05-27  9:41 ` [Bug c++/92752] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-05-22  3:11 ` cvs-commit at gcc dot gnu.org [this message]
2023-06-30  4:04 ` [Bug c++/92752] [10 " cvs-commit at gcc dot gnu.org
2023-07-07  8:43 ` rguenth 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-92752-4-FlZM5AcHQP@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).