From patchwork Fri Feb 1 17:42:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 217547 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 5F0BF2C0086 for ; Sat, 2 Feb 2013 04:44:14 +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=1360345454; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=I8+WWh0w6ADp2YYN/ZT0Bj9D58A=; b=s7/vfyqkzIKJLI4 iUcr82hukMgz9OqoxFgJbz5Vgw/4zjngJou3cWG3YPd5v6U37KzKl6PSk4Dm6AOx P9lDjicLM1gHxcNBTHiSfWDjhHBALpwG20585gdkkHcM2mpjxT2FKZq+8flDcG4s /maYE6QFIrpOsAwphtGs+w13Sfm8= 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:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:X-MC-Unique:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=w7RIiJBYkSJKPm3vx8YzsltaUwhwl9Qupy2C4f9SRmBZ0gRDrB9wAeipD1istF /spwsz1EdIwiKLhQEVN1nYPpAOLfg+N+51nlUOW4H3HUnobXlUgdQB5q2+VlQNdV bdjRZSLF3Uo1+ecMPScCAR5600yL8ErEC5R843TT2f1yM=; Received: (qmail 19361 invoked by alias); 1 Feb 2013 17:43:15 -0000 Received: (qmail 19343 invoked by uid 22791); 1 Feb 2013 17:43:14 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, KHOP_THREADED, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Feb 2013 17:43:02 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 01 Feb 2013 17:43:00 +0000 Received: from e106375-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 1 Feb 2013 17:43:00 +0000 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: marcus.shawcroft@arm.com Subject: [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload. Date: Fri, 1 Feb 2013 17:42:32 +0000 Message-Id: <1359740555-10179-4-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1359740555-10179-1-git-send-email-james.greenhalgh@arm.com> References: <1359740555-10179-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: 113020117430007401 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, push_reload takes an `enum reload_type' as its final argument. On trunk we just cast the int we have to the correct type, so we do that here to mirror trunk and correct the warning. We can't fix this by changing the type of the argument we take as we would then need to forward declare the enum when giving the prototype, which is illegal. This fixes the warning: config/aarch64/aarch64.c: In function ‘aarch64_legitimize_reload_address’: config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argument 11 of ‘push_reload’ is invalid in C++ [-Wc++-compat] Regression tested aarch64-none-elf with no regressions. OK for aarch64-4.7-branch? Thanks, James --- gcc/ 2013-02-01 James Greenhalgh * config/aarch64/aarch64.c (aarch64_legitimize_reload_address): Cast 'type' before passing to push_reload. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 62d0a12..fef2983 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -3701,7 +3701,7 @@ aarch64_legitimize_reload_address (rtx *x_p, x = copy_rtx (x); push_reload (orig_rtx, NULL_RTX, x_p, NULL, BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, type); + opnum, (enum reload_type) type); return x; } @@ -3714,7 +3714,7 @@ aarch64_legitimize_reload_address (rtx *x_p, { push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL, BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0, - opnum, type); + opnum, (enum reload_type) type); return x; } @@ -3778,7 +3778,7 @@ aarch64_legitimize_reload_address (rtx *x_p, push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL, BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, - opnum, type); + opnum, (enum reload_type) type); return x; }