From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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, 01 Feb 2013 17:43:00 -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 Content-Type: multipart/mixed; boundary="------------1.8.1.rc3.28.gcf793a4" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg00026.txt.bz2 This is a multi-part message in MIME format. --------------1.8.1.rc3.28.gcf793a4 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable Content-length: 896 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 =E2=80=98aarch64_legitimize_reload_ad= dress=E2=80=99: config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argu= ment 11 of =E2=80=98push_reload=E2=80=99 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. --------------1.8.1.rc3.28.gcf793a4 Content-Type: text/x-patch; name=0003-AArch64-4.7-Fix-warning-aarch64_legitimize_reload_ad.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0003-AArch64-4.7-Fix-warning-aarch64_legitimize_reload_ad.patch" Content-length: 1000 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 =3D 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; } =20 @@ -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; } =20 @@ -3778,7 +3778,7 @@ aarch64_legitimize_reload_address (rtx *x_p, =20 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; } =20= --------------1.8.1.rc3.28.gcf793a4--