public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gcc-bugzilla at mkarcher dot dialup.fu-berlin.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108483] gcc warns about suspicious constructs for unevaluted ?: operand Date: Fri, 20 Jan 2023 20:15:14 +0000 [thread overview] Message-ID: <bug-108483-4-NtM9hIgnZV@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108483-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483 --- Comment #3 from Michael Karcher <gcc-bugzilla at mkarcher dot dialup.fu-berlin.de> --- Thanks for the pointer to #4210. Note that 4210 is slightly different, though. In that report, the condition and the warnable expression are in different statements, and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210#c13 explicitly mentioned using a ternary expression to enable gcc to see the deadness of the code, using a flag called "skip_evaluation". This PR concerns a case that uses ?:, so I wonder whether skip_evaluation still exists, and could be used to gate the sizeof-pointer-div warning.
next prev parent reply other threads:[~2023-01-20 20:15 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-20 18:27 [Bug c/108483] New: " gcc-bugzilla at mkarcher dot dialup.fu-berlin.de 2023-01-20 20:01 ` [Bug c/108483] " pinskia at gcc dot gnu.org 2023-01-20 20:03 ` segher at gcc dot gnu.org 2023-01-20 20:15 ` gcc-bugzilla at mkarcher dot dialup.fu-berlin.de [this message] 2023-01-20 21:05 ` segher at gcc dot gnu.org 2023-01-20 21:59 ` jakub at gcc dot gnu.org 2023-01-21 11:12 ` jakub at gcc dot gnu.org 2023-01-21 12:17 ` 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-108483-4-NtM9hIgnZV@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).