]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix CTNIL static data comments
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 14 Mar 2016 04:51:07 +0000 (21:51 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 14 Mar 2016 19:55:30 +0000 (19:55 +0000)
Change-Id: I434f881c10dec41a802641db8873abf1353beba2
Reviewed-on: https://go-review.googlesource.com/20671
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/gc/sinit.go

index 3c79212528cd022b70460878509dd9d793fab2d7..3014a927ed11e273b9449b79255f53cdc2a517e0 100644 (file)
@@ -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)
                }
 
index b1b774a7f1095b8c7c73712b1aaabaca5a8aeaa7..8b3ea538f1d3349c113f96466aa1b31bd0993f6b 100644 (file)
@@ -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