diff mbox

[rs6000] Fix warning building libgcc

Message ID alpine.LNX.2.00.1111101441330.4527@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Nov. 10, 2011, 1:42 p.m. UTC
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  <rguenther@suse.de>

	* config/rs6000/linux-unwind.h (frob_update_context): Properly
	cast the third argument of _Unwind_SetGRPtr to void *.
diff mbox

Patch

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));
 	    }
 	}
     }