public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/103480] [10/11/12 Regression] -Werror=useless-cast with constexpr destructor
Date: Tue, 30 Nov 2021 00:46:40 +0000	[thread overview]
Message-ID: <bug-103480-4-ZlbjWcPPww@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103480-4@http.gcc.gnu.org/bugzilla/>

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-Werror=useless-cast with   |[10/11/12 Regression]
                   |constexpr destructor        |-Werror=useless-cast with
                   |                            |constexpr destructor
   Target Milestone|---                         |10.4
           Priority|P3                          |P2

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r10-6527:

commit aaa26bf496a646778ac861aed124d960b5bf549f
Author: Jason Merrill <jason@redhat.com>
Date:   Sun Jan 26 22:58:32 2020 -0500

    c++: Use constexpr to avoid wrong -Wsign-compare (PR90691).

    We would like to do constexpr evaluation to avoid false positives on
    warnings, but constexpr evaluation can involve function body copying that
    changes DECL_UID, which breaks -fcompare-debug.  So let's remember
    that we need to avoid that.

            PR c++/90691
            * expr.c (fold_for_warn): Call maybe_constant_value.
            * constexpr.c (struct constexpr_ctx): Add uid_sensitive field.
            (maybe_constant_value): Add uid_sensitive parm.
            (get_fundef_copy): Don't copy if it's true.
            (cxx_eval_call_expression): Don't instantiate if it's true.
            (cxx_eval_outermost_constant_expr): Likewise.

  parent reply	other threads:[~2021-11-30  0:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 22:51 [Bug c++/103480] New: [10,11,12]Werror=useless-cast " peeceseven at gmail dot com
2021-11-29 23:06 ` [Bug c++/103480] -Werror=useless-cast " mpolacek at gcc dot gnu.org
2021-11-30  0:11 ` mpolacek at gcc dot gnu.org
2021-11-30  0:46 ` mpolacek at gcc dot gnu.org [this message]
2021-11-30  0:52 ` [Bug c++/103480] [10/11/12 Regression] " mpolacek at gcc dot gnu.org
2021-12-30 17:49 ` jakub at gcc dot gnu.org
2022-01-12  8:49 ` cvs-commit at gcc dot gnu.org
2022-01-12  8:53 ` [Bug c++/103480] [10/11 " jakub at gcc dot gnu.org
2022-01-24  9:21 ` cvs-commit at gcc dot gnu.org
2022-01-24  9:28 ` [Bug c++/103480] [10 " jakub at gcc dot gnu.org
2022-05-10  8:22 ` cvs-commit at gcc dot gnu.org
2022-05-10 10:14 ` jakub 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-103480-4-ZlbjWcPPww@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).