From: Josh Bleecher Snyder Date: Mon, 14 Mar 2016 04:51:07 +0000 (-0700) Subject: cmd/compile: fix CTNIL static data comments X-Git-Tag: go1.7beta1~1342 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=57faad66772390defb9c708a31eaf5e51a0c18c3;p=gostls13.git cmd/compile: fix CTNIL static data comments Change-Id: I434f881c10dec41a802641db8873abf1353beba2 Reviewed-on: https://go-review.googlesource.com/20671 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Matthew Dempsky TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go index 3c79212528..3014a927ed 100644 --- a/src/cmd/compile/internal/gc/obj.go +++ b/src/cmd/compile/internal/gc/obj.go @@ -328,7 +328,6 @@ func gdata(nam *Node, nr *Node, wid int) { } default: - // CTNILs don't reach gdata; search for CTNIL in sinit.go. Probably they should, eventually. Fatalf("gdata unhandled OLITERAL %v", nr) } diff --git a/src/cmd/compile/internal/gc/sinit.go b/src/cmd/compile/internal/gc/sinit.go index b1b774a7f1..8b3ea538f1 100644 --- a/src/cmd/compile/internal/gc/sinit.go +++ b/src/cmd/compile/internal/gc/sinit.go @@ -514,6 +514,7 @@ func staticname(t *Type, ctxt int) *Node { } func isliteral(n *Node) bool { + // Treat nils as zeros rather than literals. if n.Op == OLITERAL { if n.Val().Ctype() != CTNIL { return true