1
0
mirror of https://github.com/golang/go synced 2024-11-23 12:40:11 -07:00
go/doc
Robert Griesemer e4ce08afe0 spec: clarify restrictions on RHS of non-constant shifts
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>
2017-06-08 16:46:15 +00:00
..
articles *.bash: always use the same string equality operator 2017-03-14 21:46:31 +00:00
codewalk
devel doc: document go1.8.3 2017-05-24 18:08:31 +00:00
gopher
play
progs all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
asm.html doc: add mips, mips64 information to asm.html 2016-12-20 20:58:12 +00:00
cmd.html doc: mention that go tools is needed to access some tool 2017-05-22 15:51:19 +00:00
code.html doc: add link to the setting GOPATH guide 2017-03-07 00:59:54 +00:00
conduct.html doc: update Code of Conduct wording and scope 2017-02-15 21:42:39 +00:00
contrib.html website: mention go1.8 in project page 2017-02-23 19:17:44 +00:00
contribute.html doc: fix minor formatting issues in contribute.html 2017-05-04 18:27:26 +00:00
debugging_with_gdb.html doc/gdb: mention GOTRACEBACK=crash 2017-01-13 18:05:46 +00:00
docs.html
effective_go.html doc: escape some HTML in Effective Go code examples 2017-04-20 16:29:19 +00:00
gccgo_contribute.html
gccgo_install.html doc: update gccgo docs 2017-01-24 21:21:59 +00:00
go1.1.html
go1.2.html
go1.3.html
go1.4.html
go1.5.html
go1.6.html
go1.7.html doc: fix broken links in 1.7 release docs 2016-11-07 18:51:29 +00:00
go1.8.html doc: fix broken link in go1.8.html 2017-02-22 23:51:12 +00:00
go1.9.html doc: list testing package changes in 1.9 release notes 2017-06-07 19:57:25 +00:00
go1.html
go1compat.html
go_faq.html doc, cmd/go: adjust documentation for default GOPATH 2016-11-30 21:40:00 +00:00
go_mem.html
go_spec.html spec: clarify restrictions on RHS of non-constant shifts 2017-06-08 16:46:15 +00:00
go-logo-black.png
go-logo-blue.png
go-logo-white.png
help.html doc: add Go Time podcast to the help page 2017-04-21 00:42:07 +00:00
ie.css
install-source.html doc: update bootstrap archive URL 2017-05-31 21:03:26 +00:00
install.html doc: consistently link to the SettingGOPATH page 2017-02-02 21:31:33 +00:00
root.html
security.html doc: dissuade people from using PGP for security reports 2017-04-17 18:33:08 +00:00
share.png
tos.html