From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19875 invoked by alias); 7 Oct 2010 00:45:24 -0000 Received: (qmail 19867 invoked by uid 22791); 7 Oct 2010 00:45:24 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Oct 2010 00:45:20 +0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/45918] Lack of warning on meaningless unsigned to zero comparison X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 07 Oct 2010 00:45:00 -0000 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-10/txt/msg00598.txt.bz2 Message-ID: <20101007004500.c4ewTksByTDiQ8rKP7RBHW2G1IyViCNx-bgk9ZwiYuU@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D45918 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2010.10.07 00:45:06 Ever Confirmed|0 |1 --- Comment #4 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2010-10-07 00:45:06 UTC --- manuel@gcc11:~$ test/164733M/build/gcc/cc1plus -Wall -Wextra test.C void G::fn() void G::fn() [with unsigned int NUM =3D 1u] test.C:14:17: instantiated from here test.C:10:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] manuel@gcc11:~$ test/164733M/build/gcc/xgcc -v Using built-in specs. COLLECT_GCC=3Dtest/164733M/build/gcc/xgcc Target: x86_64-unknown-linux-gnu Configured with: /home/manuel/test/src/configure --prefix=3D/home/manuel/test/./164733M/install --enable-languages=3Dall,ada --enable-decimal-float --with-mpc=3D/opt/cfarm/mpc-0.8 --with-mpfr=3D/opt/cfarm/mpfr-2.4.1/ Thread model: posix gcc version 4.6.0 20100929 (experimental) [trunk revision 146344] (GCC)