mirror of
https://github.com/golang/go
synced 2024-11-23 12:40:11 -07:00
e4ce08afe0
For non-constant shifts with an untyped constant shift count, the spec only said that it must "be converted to unsigned integer type". go/types accepts any (arbitrarily large) integer value. Both cmd/compile and gccgo require that the shift count be representable as a uint value in that case (if the shift count is typed, it may be any unsigned integer type). This change adjusts the spec to state what the compilers have been doing all along. The new wording matches similar rules elsewhere (e.g., for untyped array and slice indices). Also, while technically this is a restriction (we could permit arbitrarily large shift counts), in practice this is irrelevant. Fixes #14822. Change-Id: Ia75834c67483cf761c10025c8df758f225ef67c2 Reviewed-on: https://go-review.googlesource.com/45072 Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
---|---|---|
.. | ||
articles | ||
codewalk | ||
devel | ||
gopher | ||
play | ||
progs | ||
asm.html | ||
cmd.html | ||
code.html | ||
conduct.html | ||
contrib.html | ||
contribute.html | ||
debugging_with_gdb.html | ||
docs.html | ||
effective_go.html | ||
gccgo_contribute.html | ||
gccgo_install.html | ||
go1.1.html | ||
go1.2.html | ||
go1.3.html | ||
go1.4.html | ||
go1.5.html | ||
go1.6.html | ||
go1.7.html | ||
go1.8.html | ||
go1.9.html | ||
go1.html | ||
go1compat.html | ||
go_faq.html | ||
go_mem.html | ||
go_spec.html | ||
go-logo-black.png | ||
go-logo-blue.png | ||
go-logo-white.png | ||
help.html | ||
ie.css | ||
install-source.html | ||
install.html | ||
root.html | ||
security.html | ||
share.png | ||
tos.html |