From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19224 invoked by alias); 17 Apr 2010 17:41:13 -0000 Received: (qmail 19182 invoked by uid 48); 17 Apr 2010 17:40:59 -0000 Date: Sat, 17 Apr 2010 17:41:00 -0000 Message-ID: <20100417174059.19181.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/43772] Errant -Wlogical-op warning when testing limits In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "P at draigBrady dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg01656.txt.bz2 ------- Comment #2 from P at draigBrady dot com 2010-04-17 17:40 ------- Well the warning should at least change. However the logical operation itself is not an issue, so I think a warning should not be issued at all. I.E. if TOP and BOT are defined as a narrower range then we don't get a warning currently. When TOP and BOT do encompass the whole range then the compiler should just optimize out the conditional test without warning. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772