From a3e31b3541b0a95b0eb32687049a7647d1e3ebda Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 22 Jan 2012 11:50:45 -0800 Subject: 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 http://codereview.appspot.com/5561059 --- test/blank1.go | 1 + 1 file changed, 1 insertion(+) (limited to 'test/blank1.go') diff --git a/test/blank1.go b/test/blank1.go index 5bc1efce5..bcc78466d 100644 --- a/test/blank1.go +++ b/test/blank1.go @@ -9,4 +9,5 @@ package _ // ERROR "invalid package name _" func main() { _() // ERROR "cannot use _ as value" x := _+1 // ERROR "cannot use _ as value" + _ = x } -- cgit v1.2.1