public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: gustav@virtutech.se To: gcc-gnats@gcc.gnu.org Cc: mattias@virtutech.se Subject: c/4210: bad warning with dead code Date: Mon, 03 Sep 2001 11:36:00 -0000 [thread overview] Message-ID: <20010903182858.26588.qmail@sourceware.cygnus.com> (raw) >Number: 4210 >Category: c >Synopsis: bad warning with dead code >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Sep 03 11:36:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: gustav@virtutech.se >Release: GNU C version 3.0.1 20010626 (prerelease) (i386-pc-linux-gnu) >Organization: >Environment: >Description: gcc outputs a warning about shifts >= width of type inside dead code when that code is dead because of a const variable. This can easily happen in autogenerated code, or when you do operations on preprocessor defines. >How-To-Repeat: Compile the following with -Wall -O2: int rol0(int a) { const int b = 0; if (b) { a = (a << b) | (a >> (8 * sizeof a - b)); } return a; } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2001-09-03 11:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-09-03 11:36 gustav [this message] 2002-11-05 7:43 bangerth 2002-11-06 14:16 Wolfgang Bangerth
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=20010903182858.26588.qmail@sourceware.cygnus.com \ --to=gustav@virtutech.se \ --cc=gcc-gnats@gcc.gnu.org \ --cc=mattias@virtutech.se \ /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).