From: Matthew Dempsky Date: Thu, 3 Mar 2016 04:32:40 +0000 (-0800) Subject: cmd/compile: more lineno type conversions X-Git-Tag: go1.7beta1~1583 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=868fb9ff1d95f3f2f344c076ff2fafbb483e0631;p=gostls13.git cmd/compile: more lineno type conversions Change-Id: Ib0a116a78f61eafe88a0ea5dc6733750ae755fdf Reviewed-on: https://go-review.googlesource.com/20156 Run-TryBot: Matthew Dempsky Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/gc/align.go b/src/cmd/compile/internal/gc/align.go index 03c6a0e936..e5d7e6b93e 100644 --- a/src/cmd/compile/internal/gc/align.go +++ b/src/cmd/compile/internal/gc/align.go @@ -125,7 +125,7 @@ func dowidth(t *Type) { if t.Width == -2 { if !t.Broke { t.Broke = true - yyerrorl(int32(t.Lineno), "invalid recursive type %v", t) + yyerrorl(t.Lineno, "invalid recursive type %v", t) } t.Width = 0 @@ -142,7 +142,7 @@ func dowidth(t *Type) { defercalc++ lno := lineno - lineno = int32(t.Lineno) + lineno = t.Lineno t.Width = -2 t.Align = 0 diff --git a/src/cmd/compile/internal/gc/go.go b/src/cmd/compile/internal/gc/go.go index 43158e0604..e1b75d1b0c 100644 --- a/src/cmd/compile/internal/gc/go.go +++ b/src/cmd/compile/internal/gc/go.go @@ -104,7 +104,7 @@ type Type struct { Nod *Node // canonical OTYPE node Orig *Type // original type (type literal or predefined type) - Lineno int + Lineno int32 // TFUNC Thistuple int diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go index 72bdfb24f9..b8bd66c7b1 100644 --- a/src/cmd/compile/internal/gc/subr.go +++ b/src/cmd/compile/internal/gc/subr.go @@ -391,7 +391,7 @@ func typ(et EType) *Type { t := new(Type) t.Etype = et t.Width = BADWIDTH - t.Lineno = int(lineno) + t.Lineno = lineno t.Orig = t return t }