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 {
case lex.LSH:
p.next()
shift := p.factor()
if int64(shift) < 0 {
p.errorf("negative left shift %d", shift)
}
// shift is a uint, so can never be negative.
return value << shift
case lex.RSH:
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