From patchwork Thu Dec 13 12:45:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 205824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F08E32C0092 for ; Thu, 13 Dec 2012 23:45:56 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1356007557; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=o10TNhwglEIFTMUPmZd5 tJR6Eog=; b=DJgn3qzsj0wjGZxc77InvSIgcVbm9nI09yjf9LmqYSoZW2A5M+Kv atSOUteWT4sdFe3V6XQijeIR+5gc9ZFQsZ/vVHaVoCB+P3IpXWJSx6LO0N8Omsua aJQZJ6i82uGOKy7D9QDPutsNBEY+xUiKOULDv9t25CF/YkKWG4VMkUc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=haSLwaA06tI7I6FGKS2scsmp2I5Mq5ey4zFNpgpRoyWDExj5Zcj2HicjQNIZXb 6BYGZWvi1VWwa3Dq/zPYHWiuFB8z1cssTs3xMunwIHEX9RgNhytam3STK2HMnAnK qvC7ZRg9s7bA1Na5u+jSn6HgtpagCkc+IhulJubHpUJwU=; Received: (qmail 32728 invoked by alias); 13 Dec 2012 12:45:53 -0000 Received: (qmail 32715 invoked by uid 22791); 13 Dec 2012 12:45:51 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Dec 2012 12:45:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBDCjgg6021369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Dec 2012 07:45:42 -0500 Received: from zalov.redhat.com (vpn1-5-170.ams2.redhat.com [10.36.5.170]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBDCjd1r026069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 13 Dec 2012 07:45:41 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qBDCjci5009225 for ; Thu, 13 Dec 2012 13:45:38 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qBDCjcC6009224 for gcc-patches@gcc.gnu.org; Thu, 13 Dec 2012 13:45:38 +0100 Date: Thu, 13 Dec 2012 13:45:38 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Avoid -Wsign-compare warning Message-ID: <20121213124538.GR2315@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi! I keep seeing a -Wsign-compare warning from GCC 4.7 here, alloc_count is const int = 16, but length () method returns unsigned. Perhaps GCC 4.8 folds it to 16 early enough for the -Wsign-compare warning (might be related to the sizeof changes), but still I think it doesn't hurt to fix this up. Changing alloc_count to unsigned would leave to other -Wsign-compare warnings, because i is signed, ... Ok for trunk? 2012-12-13 Jakub Jelinek * tree-ssa-threadedge.c (propagate_threaded_block_debug_into): Avoid -Wsign-compare warning. Jakub --- gcc/tree-ssa-threadedge.c (revision 194469) +++ gcc/tree-ssa-threadedge.c (working copy) @@ -713,7 +713,7 @@ propagate_threaded_block_debug_into (bas if (i >= 0) continue; - if (fewvars.length () < alloc_count) + if (fewvars.length () < (unsigned) alloc_count) fewvars.quick_push (var); else {