From: Robert Griesemer Date: Wed, 4 Sep 2019 15:42:12 +0000 (-0700) Subject: spec: clarify that shift count must be non-negative X-Git-Tag: go1.14beta1~1203 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6fcc2d85be557c6890a1ad50ee280fa3cd8088e6;p=gostls13.git spec: clarify that shift count must be non-negative Fixes #34056. Change-Id: I2c9b7a20d19f458df5dcc376e29bee6be1f09f7a Reviewed-on: https://go-review.googlesource.com/c/go/+/193277 Reviewed-by: Brad Fitzpatrick --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 4f94b14fa5..724b044aa4 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -3732,7 +3732,7 @@ be replaced by a bitwise AND operation:

The shift operators shift the left operand by the shift count specified by the -right operand, which must be positive. If the shift count is negative at run time, +right operand, which must be non-negative. If the shift count is negative at run time, a run-time panic occurs. The shift operators implement arithmetic shifts if the left operand is a signed integer and logical shifts if it is an unsigned integer.