From patchwork Thu Nov 10 13:42:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 124879 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 3D3E8B6F85 for ; Fri, 11 Nov 2011 00:43:13 +1100 (EST) Received: (qmail 5415 invoked by alias); 10 Nov 2011 13:43:08 -0000 Received: (qmail 5405 invoked by uid 22791); 10 Nov 2011 13:43:08 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 13:42:47 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 88D3F890B6 for ; Thu, 10 Nov 2011 14:42:46 +0100 (CET) Date: Thu, 10 Nov 2011 14:42:46 +0100 (CET) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH][rs6000] Fix warning building libgcc Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 Currently when building unwind-dw2.c for powerpc64 I see In file included from ../../../libgcc/unwind-dw2.c:376:0: ./md-unwind-support.h: In function 'frob_update_context': ./md-unwind-support.h:371:8: warning: passing argument 3 of '_Unwind_SetGRPtr' makes pointer from integer without a cast [enabled by default] ../../../libgcc/unwind-dw2.c:281:1: note: expected 'void *' but argument is of type '_Unwind_Word' looking at other places we cast such arguments to void *. Ok? Thanks, Richard. 2011-11-10 Richard Guenther * config/rs6000/linux-unwind.h (frob_update_context): Properly cast the third argument of _Unwind_SetGRPtr to void *. Index: libgcc/config/rs6000/linux-unwind.h =================================================================== --- libgcc/config/rs6000/linux-unwind.h (revision 181252) +++ libgcc/config/rs6000/linux-unwind.h (working copy) @@ -368,7 +368,7 @@ frob_update_context (struct _Unwind_Cont before the bctrl so this is the first and only place we need to use the stored R2. */ _Unwind_Word sp = _Unwind_GetGR (context, 1); - _Unwind_SetGRPtr (context, 2, sp + 40); + _Unwind_SetGRPtr (context, 2, (void *)(sp + 40)); } } }