From patchwork Wed Dec 8 16:45:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 74747 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 285BBB708B for ; Thu, 9 Dec 2010 03:45:59 +1100 (EST) Received: (qmail 27581 invoked by alias); 8 Dec 2010 16:45:58 -0000 Received: (qmail 27569 invoked by uid 22791); 8 Dec 2010 16:45:57 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD 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; Wed, 08 Dec 2010 16:45:53 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB8GjqDb030641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 8 Dec 2010 11:45:52 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oB8Gjppw009837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 8 Dec 2010 11:45:52 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id oB8GjpgK012171 for ; Wed, 8 Dec 2010 17:45:51 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id oB8Gjpn2012170 for gcc-patches@gcc.gnu.org; Wed, 8 Dec 2010 17:45:51 +0100 Date: Wed, 8 Dec 2010 17:45:51 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix -Wunused warning in regrename.c (PR middle-end/46844) Message-ID: <20101208164550.GG29412@tyan-ft48-01.lab.bos.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! REG argument is only used if one of the target macros is defined, so on some targets we warn that reg is unused. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2010-12-08 Jakub Jelinek PR middle-end/46844 * regrename.c (check_new_reg_p): Add ATTRIBUTE_UNUSED to reg parameter. Jakub --- gcc/regrename.c.jj 2010-12-07 17:32:49.000000000 +0100 +++ gcc/regrename.c 2010-12-08 13:21:24.000000000 +0100 @@ -309,8 +309,8 @@ sort_du_head (struct du_head **head) registers. */ static bool -check_new_reg_p (int reg, int new_reg, struct du_head *this_head, - HARD_REG_SET this_unavailable) +check_new_reg_p (int reg ATTRIBUTE_UNUSED, int new_reg, + struct du_head *this_head, HARD_REG_SET this_unavailable) { enum machine_mode mode = GET_MODE (*this_head->first->loc); int nregs = hard_regno_nregs[new_reg][mode];