mirror of
https://github.com/golang/go
synced 2024-11-26 19:41:19 -07:00
08df4dcf7d
ideally cause the compiler to give an error. Right now 6g warns about large shifts but does not give an error. This CL removes the out of range shift from shift.go, so that it will work with gccgo, and adds a test case in bugs/ to be fixed at a later date. R=ken,r DELTA=23 (9 added, 14 deleted, 0 changed) OCL=16085 CL=16088
11 lines
247 B
Go
11 lines
247 B
Go
// errchk $G $D/$F.go
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
func f() {
|
|
v := 1 << 1025; // ERROR "overflow"
|
|
}
|