From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21449 invoked by alias); 30 Nov 2012 12:22:44 -0000 Received: (qmail 21433 invoked by uid 22791); 30 Nov 2012 12:22:41 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Nov 2012 12:22:36 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id qAUCMU7R029916; Fri, 30 Nov 2012 13:22:30 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id qAUCMSLI011405; Fri, 30 Nov 2012 13:22:28 +0100 (CET) Date: Fri, 30 Nov 2012 12:22:00 -0000 Message-Id: <201211301222.qAUCMSLI011405@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: yao@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <1354260922-13995-1-git-send-email-yao@codesourcery.com> (message from Yao Qi on Fri, 30 Nov 2012 15:35:22 +0800) Subject: Re: [committed] Remove a redundant condition check in tic6x-linux-tdep.c References: <1354260922-13995-1-git-send-email-yao@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00917.txt.bz2 > From: Yao Qi > Date: Fri, 30 Nov 2012 15:35:22 +0800 > > Hi, > When gdb is configured as target=tic6x-uclinux, and compiled with clang, > I get this warning: > > gdb/tic6x-linux-tdep.c:66:19: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] > > It is redundant to check 'REGNUM >= 0' as it is unsigned. The > following patch is to fix it. Committed. Hmm, well, perhaps the regnum variable should just be made signed. That's typically what we use for register numbers, since -1 has the special meaning of "all registers"/