mirror of
https://github.com/golang/go
synced 2024-11-21 17:04:42 -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)
|
||||
*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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user