From: David Symonds Date: Fri, 27 Jan 2012 02:59:32 +0000 (+1100) Subject: gc: remove extra paranoia from inlining unsafe.Pointer fix. X-Git-Tag: weekly.2012-01-27~1 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1b19134c4f8f6d303f640948164dc6e7c691f756;p=gostls13.git gc: remove extra paranoia from inlining unsafe.Pointer fix. R=rsc CC=golang-dev https://golang.org/cl/5569075 --- diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 0a377822ea..64a0070776 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -1149,7 +1149,9 @@ assignop(Type *src, Type *dst, char **why) if(why != nil) *why = ""; - if(safemode && (importpkg == nil || importpkg == localpkg) && src != T && src->etype == TUNSAFEPTR) { + // TODO(rsc,lvd): This behaves poorly in the presence of inlining. + // https://code.google.com/p/go/issues/detail?id=2795 + if(safemode && importpkg == nil && src != T && src->etype == TUNSAFEPTR) { yyerror("cannot use unsafe.Pointer"); errorexit(); }