1
0
mirror of https://github.com/golang/go synced 2024-10-02 20:41:21 -06:00

gc: remove extra paranoia from inlining unsafe.Pointer fix.

R=rsc
CC=golang-dev
https://golang.org/cl/5569075
This commit is contained in:
David Symonds 2012-01-27 13:59:32 +11:00
parent cdbed823bd
commit 1b19134c4f

View File

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