diff --git a/src/cmd/internal/gc/gsubr.go b/src/cmd/internal/gc/gsubr.go index cee5099e3ae..e86d2ab3e4d 100644 --- a/src/cmd/internal/gc/gsubr.go +++ b/src/cmd/internal/gc/gsubr.go @@ -208,7 +208,7 @@ func ggloblnod(nam *Node) { p.To.Sym = nil p.To.Type = obj.TYPE_CONST p.To.Offset = nam.Type.Width - if nam.Readonly != 0 { + if nam.Readonly { p.From3.Offset = obj.RODATA } if nam.Type != nil && !haspointers(nam.Type) { diff --git a/src/cmd/internal/gc/sinit.go b/src/cmd/internal/gc/sinit.go index 12562231fcc..c5e006b160f 100644 --- a/src/cmd/internal/gc/sinit.go +++ b/src/cmd/internal/gc/sinit.go @@ -521,7 +521,7 @@ func staticname(t *Type, ctxt int) *Node { statuniqgen++ n := newname(Lookup(namebuf)) if ctxt == 0 { - n.Readonly = 1 + n.Readonly = true } addvar(n, t, PEXTERN) return n diff --git a/src/cmd/internal/gc/syntax.go b/src/cmd/internal/gc/syntax.go index 9b2f9aeaef8..f209afd41fc 100644 --- a/src/cmd/internal/gc/syntax.go +++ b/src/cmd/internal/gc/syntax.go @@ -45,7 +45,7 @@ type Node struct { Initorder uint8 Used uint8 Isddd uint8 - Readonly uint8 + Readonly bool Implicit uint8 Addrtaken uint8 // address taken, even if not moved to heap Assigned uint8 // is the variable ever assigned to