Patchwork libgo patch committed: Fix cast error

login
register
mail settings
Submitter Ian Taylor
Date May 25, 2012, 6:22 p.m.
Message ID <mcrk400ktmz.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/161393/
State New
Headers show

Comments

Ian Taylor - May 25, 2012, 6:22 p.m.
This patch to libgo fixes a cast error in the new file print.c that
shows up on 32-bit systems.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline and 4.7 branch.

Ian

Patch

diff -r ae91b408310f libgo/runtime/print.c
--- a/libgo/runtime/print.c	Thu May 24 14:06:08 2012 -0700
+++ b/libgo/runtime/print.c	Fri May 25 11:20:33 2012 -0700
@@ -136,7 +136,7 @@ 
 runtime_printpc(void *p __attribute__ ((unused)))
 {
 	runtime_prints("PC=");
-	runtime_printhex((uint64)runtime_getcallerpc(p));
+	runtime_printhex((uint64)(uintptr)runtime_getcallerpc(p));
 }
 
 void