public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wolter.hellmundvega at tevva dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/38341] Wrong warning comparison of promoted ~unsigned with unsigned Date: Thu, 29 Jun 2023 14:52:13 +0000 [thread overview] Message-ID: <bug-38341-4-nsFy680Cte@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-38341-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38341 wolter.hellmundvega at tevva dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wolter.hellmundvega at tevva dot c | |om --- Comment #14 from wolter.hellmundvega at tevva dot com --- I'm not sure this is fixed, please correct me if wrong, but #include <stdio.h> #include <stdint.h> int main(void) { const uint8_t u = 0U; const uint8_t y = (uint8_t) ~u; return ((uint8_t) u != (uint8_t) ~y); } gives warning test.c: In function ‘main’: test.c:9:25: warning: comparison of promoted bitwise complement of an unsigned value with unsigned [-Wsign-compare] 9 | return ((uint8_t) u != (uint8_t) ~y); | ^~ Does this not mean that this issue is still present?
next prev parent reply other threads:[~2023-06-29 14:52 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-38341-4@http.gcc.gnu.org/bugzilla/> 2014-01-29 16:01 ` gjl at gcc dot gnu.org 2023-05-20 4:26 ` pinskia at gcc dot gnu.org 2023-06-29 14:52 ` wolter.hellmundvega at tevva dot com [this message] 2008-12-01 8:36 [Bug c/38341] New: " fredrik dot hederstierna at securitas-direct dot com 2008-12-01 10:02 ` [Bug c/38341] " rguenth at gcc dot gnu dot org 2008-12-01 12:41 ` fredrik dot hederstierna at securitas-direct dot com 2008-12-01 12:50 ` rguenth at gcc dot gnu dot org 2008-12-01 12:56 ` fredrik dot hederstierna at securitas-direct dot com 2008-12-01 13:36 ` fredrik dot hederstierna at securitas-direct dot com 2008-12-02 12:15 ` rguenth at gcc dot gnu dot org 2009-02-23 23:53 ` john dot carter at tait dot co dot nz 2009-02-24 0:40 ` michael dot malone at tait dot co dot nz 2009-02-24 0:43 ` michael dot malone at tait dot co dot nz
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-38341-4-nsFy680Cte@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).