public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/103881] Wconversion false positive when using |= and &= with two rvalues in binary op Date: Fri, 31 Dec 2021 17:48:58 +0000 [thread overview] Message-ID: <bug-103881-4-vWKGZ7Nqbe@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103881-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103881 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- See C99 6.3.1.1/2 and 6.3.1.8, yes, in all cases of |=, &=, |, & the uint8_t operands are promoted to int. And the reason why we don't warn for the simple binary operations is that those common cases have special cases for the warnings, while if you have more complex expressions you get warnings. This is a FE warning, value range propagation etc. doesn't happen at that point...
next prev parent reply other threads:[~2021-12-31 17:48 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-31 16:46 [Bug c/103881] New: " thomas at habets dot se 2021-12-31 17:36 ` [Bug c/103881] " thomas at habets dot se 2021-12-31 17:48 ` jakub at gcc dot gnu.org [this message] 2022-01-02 12:35 ` thomas at habets dot se 2022-01-11 18:15 ` cvs-commit at gcc dot gnu.org 2022-01-20 3:58 ` egallager at gcc dot gnu.org 2022-01-20 14:56 ` thomas at habets dot se 2022-01-24 9:21 ` cvs-commit at gcc dot gnu.org 2022-05-10 8:22 ` cvs-commit at gcc dot gnu.org 2022-05-10 15:31 ` 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-103881-4-vWKGZ7Nqbe@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).