public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53277] -Wconversion cannot handle compound expressions Date: Tue, 20 Jul 2021 17:41:20 +0000 [thread overview] Message-ID: <bug-53277-4-BRPdWMgpb4@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53277-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53277 --- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> --- For C++ the comment 15 case seems to have been fixed by r10-6527: 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. But it still warns when compiled as C.
next prev parent reply other threads:[~2021-07-20 17:41 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-08 9:00 [Bug c/53277] New: Warning using -Wconversion and -Ox in gcc 4.5, 4.6 and 4.7 but not in previous releases jgpallero at gmail dot com 2012-05-08 16:06 ` [Bug c/53277] " pinskia at gcc dot gnu.org 2012-05-09 10:51 ` jgpallero at gmail dot com 2012-05-09 10:52 ` jgpallero at gmail dot com 2012-05-09 10:52 ` jgpallero at gmail dot com 2012-05-09 10:53 ` jgpallero at gmail dot com 2012-05-09 10:54 ` jgpallero at gmail dot com 2012-05-09 10:56 ` jgpallero at gmail dot com 2012-05-09 11:06 ` jgpallero at gmail dot com 2012-05-09 12:07 ` glisse at gcc dot gnu.org 2012-05-09 12:54 ` manu at gcc dot gnu.org 2012-05-09 13:11 ` jgpallero at gmail dot com 2012-05-09 13:12 ` glisse at gcc dot gnu.org 2012-05-09 13:46 ` manu at gcc dot gnu.org 2012-05-09 15:17 ` jgpallero at gmail dot com 2012-05-09 15:56 ` [Bug c/53277] -Wconversion cannot handle compound expresions manu at gcc dot gnu.org 2021-07-20 17:16 ` [Bug c/53277] -Wconversion cannot handle compound expressions me at xenu dot pl 2021-07-20 17:33 ` me at xenu dot pl 2021-07-20 17:41 ` redi at gcc dot gnu.org [this message] 2021-07-20 17:42 ` pinskia at gcc dot gnu.org 2023-06-15 0:34 ` pinskia 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-53277-4-BRPdWMgpb4@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: linkBe 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).