mirror of
https://github.com/golang/go
synced 2024-11-19 22:54:39 -07: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:
parent
cdbed823bd
commit
1b19134c4f
@ -1149,7 +1149,9 @@ assignop(Type *src, Type *dst, char **why)
|
|||||||
if(why != nil)
|
if(why != nil)
|
||||||
*why = "";
|
*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");
|
yyerror("cannot use unsafe.Pointer");
|
||||||
errorexit();
|
errorexit();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user