]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/api: set architecture sizes when type checking
authorMichael Pratt <mpratt@google.com>
Thu, 30 Sep 2021 17:26:19 +0000 (13:26 -0400)
committerMichael Pratt <mpratt@google.com>
Mon, 4 Oct 2021 20:20:20 +0000 (20:20 +0000)
commit2dc91a25f619c49b5d64af1b92497705a3325951
treed4999df9e600eb73271ab4e84eff398c446e3bfc
parent579ff8b1313479b795e3b536f7b9444094060b32
cmd/api: set architecture sizes when type checking

Otherwise the type checker defaults to amd64, which can break
type-checking for definitions using unsafe.Sizeof.

This has the side effect of changing the API output: constants with
different values across architectures (e.g., MaxInt) are now
individually listed per-arch. This actually makes the API file more
accurate, but does introduce a one-time discontinuity. These changes
have been integrated into the API files where the constants were added.

Change-Id: I4bbb0b7a7f405d3adda2d83869475c8bacdeb6a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/353331
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
api/go1.1.txt
api/go1.17.txt
api/go1.9.txt
src/cmd/api/goapi.go