1
0
mirror of https://github.com/golang/go synced 2024-11-18 00:24:48 -07:00
go/doc
nobishino 13a0f7b502 spec: clarify that signed integers>=0 are permitted as shift counts
In Go1.13 and above, signed integers are permitted as shift counts as long as they are >=0.
However, the comments in the "Arithmetic operators" section says shift operators accept "unsigned integer" as of right operands. Replacing this with "integer>=0" resolves the misunderstanding that shift
operators permit only unsigned integers.

Reference: Go1.13 Release Notes: https://golang.org/doc/go1.13

Change-Id: Icd3c7734d539ab702590e992a618c9251c653c37
GitHub-Last-Rev: 4f263a48d3
GitHub-Pull-Request: golang/go#44664
Reviewed-on: https://go-review.googlesource.com/c/go/+/297249
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Robert Griesemer <gri@golang.org>
2021-03-16 19:51:31 +00:00
..
asm.html doc/asm: add a section on go_asm.h, clean up go_tls.h section 2021-01-25 19:32:27 +00:00
go1.17.html crypto/tls: add HandshakeContext method to Conn 2021-03-16 14:05:45 +00:00
go_mem.html doc/mem: remove unnecessary pre tags within same snippet 2020-03-03 09:28:34 +00:00
go_spec.html spec: clarify that signed integers>=0 are permitted as shift counts 2021-03-16 19:51:31 +00:00