public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eyal at eyal dot emu dot id dot au" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/32061] wrong warning wording Date: Thu, 24 May 2007 00:00:00 -0000 [thread overview] Message-ID: <20070524000040.14163.qmail@sourceware.org> (raw) In-Reply-To: <bug-32061-828@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from eyal at eyal dot emu dot id dot au 2007-05-24 01:00 ------- (In reply to comment #1) > I don't see the problem because > "xx.c:7: warning: logical '&&' with non-zero constant will always evaluate as > true" > means the non-zero constant will evaluate as true and not the logical will > evaluate as true. > (In reply to comment #1) > I don't see the problem because > "xx.c:7: warning: logical '&&' with non-zero constant will always evaluate as > true" > means the non-zero constant will evaluate as true and not the logical will > evaluate as true. > But it says 'logical... will always evaluate as true' which clearly refers to the result of the logical operator, not to one of its arguments. BTW, why no warning for this? resp == 0 && 0 Naturally, all the above constants will hide behind some macros which could indicate a real error, hence the value of the warning. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32061
next prev parent reply other threads:[~2007-05-24 0:00 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-05-23 23:45 [Bug c/32061] New: " eyal at eyal dot emu dot id dot au 2007-05-23 23:47 ` [Bug c/32061] " pinskia at gcc dot gnu dot org 2007-05-24 0:00 ` eyal at eyal dot emu dot id dot au [this message] 2009-02-11 23:04 ` [Bug c/32061] (Wlogical-op) wording of warning of constant logicials need improvement manu at gcc dot gnu dot org 2009-02-12 8:29 ` eyal at eyal dot emu dot id dot au 2009-02-18 13:13 ` manu at gcc dot gnu dot org 2009-04-19 11:05 ` manu at gcc dot gnu dot org 2009-04-19 11:07 ` manu at gcc dot gnu dot 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=20070524000040.14163.qmail@sourceware.org \ --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).