Commit 3cab4760 authored by Rob Pike's avatar Rob Pike

cmd/asm: remove pointless check for negative uint

Fixes #11278.

Change-Id: Ic46fda0f42cefedc3f6085c0e77e67616ce4955e
Reviewed-on: https://go-review.googlesource.com/11297Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 13c44d27
...@@ -807,9 +807,7 @@ func (p *Parser) term() uint64 { ...@@ -807,9 +807,7 @@ func (p *Parser) term() uint64 {
case lex.LSH: case lex.LSH:
p.next() p.next()
shift := p.factor() shift := p.factor()
if int64(shift) < 0 { // shift is a uint, so can never be negative.
p.errorf("negative left shift %d", shift)
}
return value << shift return value << shift
case lex.RSH: case lex.RSH:
p.next() p.next()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment