mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
test: explicitly use variables to avoid gccgo "not used" error
I haven't looked at the source, but the gc compiler appears to omit "not used" errors when there is an error in the initializer. This is harder to do in gccgo, and frankly I think the "not used" error is still useful even if the initializer has a problem. This CL tweaks some tests to avoid the error, which is not the point of these tests in any case. R=golang-dev, r CC=golang-dev https://golang.org/cl/5561059
This commit is contained in:
parent
41914c1df8
commit
387e7c2742
7 changed files with 7 additions and 2 deletions
|
|
@ -17,5 +17,5 @@ func main() {
|
|||
println(b)
|
||||
|
||||
var c int64 = (1<<i) + 4.0 // ok - it's all int64
|
||||
println(b)
|
||||
println(c)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue