public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/107465] [10/11/12/13 Regression] Bogus warning: promoted bitwise complement of an unsigned value is always nonzero
Date: Mon, 31 Oct 2022 01:59:40 +0000	[thread overview]
Message-ID: <bug-107465-4-g9B9Fnj93y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107465-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.5
      Known to work|                            |4.1.2
            Summary|Bogus warning: promoted     |[10/11/12/13 Regression]
                   |bitwise complement of an    |Bogus warning: promoted
                   |unsigned value is always    |bitwise complement of an
                   |nonzero                     |unsigned value is always
                   |                            |nonzero
     Ever confirmed|0                           |1
      Known to fail|                            |4.4.7, 4.8.1
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=8715
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-10-31

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Also, it's weird that the warning is only issued with a typedef for the type of "x".

My bet there is some IR difference (inside GCC) which is causing an extra
NOP_EXPR (a cast) being added due to the typedef and "unsigned short" are not
represented the same internally for diagnostic reasons.


Confirmed.

r0-88988-g2d12797c692346 (PR 8715) introduced the warning in GCC 4.4.0 which
seems to point to that is what is causing the bogus warning to show up.

  parent reply	other threads:[~2022-10-31  1:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 17:59 [Bug c/107465] New: " lavr at ncbi dot nlm.nih.gov
2022-10-31  1:51 ` [Bug c/107465] " pinskia at gcc dot gnu.org
2022-10-31  1:59 ` pinskia at gcc dot gnu.org [this message]
2022-10-31  2:03 ` [Bug c/107465] [10/11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-10-31  2:03 ` pinskia at gcc dot gnu.org
2022-11-05 10:25 ` rguenth at gcc dot gnu.org
2022-11-21 14:32 ` jakub at gcc dot gnu.org
2022-11-21 14:51 ` jakub at gcc dot gnu.org
2022-11-21 15:28 ` jakub at gcc dot gnu.org
2022-11-21 19:22 ` jakub at gcc dot gnu.org
2023-03-04  9:19 ` cvs-commit at gcc dot gnu.org
2023-03-04  9:22 ` cvs-commit at gcc dot gnu.org
2023-03-04  9:25 ` [Bug c/107465] [10/11/12 " jakub at gcc dot gnu.org
2023-03-19  5:30 ` cvs-commit at gcc dot gnu.org
2023-03-19  5:30 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:28 ` [Bug c/107465] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03  9:30 ` [Bug c/107465] [10 " jakub at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:21 ` jakub at gcc dot gnu.org
2023-05-20  4:26 ` pinskia at gcc dot gnu.org
2023-05-20  4:33 ` 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-107465-4-g9B9Fnj93y@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).