Commit 874ea6a4 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile: add comment

Minor update on https://go-review.googlesource.com/27441 .

Change-Id: I605a8bfbe67e259020aa53f1d2357808197d02b6
Reviewed-on: https://go-review.googlesource.com/27631Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent 9aea69d6
......@@ -807,6 +807,10 @@ func (p *importer) node() *Node {
typ := p.typ()
n := nodlit(p.value(typ))
if !typ.IsUntyped() {
// Type-checking simplifies unsafe.Pointer(uintptr(c))
// to unsafe.Pointer(c) which then cannot type-checked
// again. Re-introduce explicit uintptr(c) conversion.
// (issue 16317).
if typ.IsUnsafePtr() {
conv := Nod(OCALL, typenod(Types[TUINTPTR]), nil)
conv.List.Set1(n)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment