mirror of
https://github.com/golang/go
synced 2024-11-23 06:00:08 -07:00
2b9b2720b8
In the current (pre-CL) version of the spec, the 2nd last shift example appears to be using the array declared in the last example. On a 32-bit platform, that array would have length 0, which would lead to a panic in the 2nd last example. Also, if this code were inside a function, it wouldn't compile (array declared after use). Use an explicitly declared array for that specific shift example. Also, split out all cases that produce different results for 32- vs 64-bit ints. Fixes #41835. Change-Id: Ie45114224509e4999197226f91f7f6f934449abb Reviewed-on: https://go-review.googlesource.com/c/go/+/260398 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
---|---|---|
.. | ||
articles | ||
codewalk | ||
gopher | ||
play | ||
progs | ||
asm.html | ||
cmd.html | ||
contribute.html | ||
debugging_with_gdb.html | ||
diagnostics.html | ||
editors.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.10.html | ||
go1.11.html | ||
go1.12.html | ||
go1.13.html | ||
go1.14.html | ||
go1.15.html | ||
go1.16.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 | ||
share.png | ||
tos.html |