<p dir="auto">by <strong>jan.newmarch</strong>:</p>
<pre class="notranslate">If a program has unused variables, then 6g produces a compile error. It would be nicer
as a compile warning instead. Often I'm commenting out a piece of code during debugging
which can change a variable from used to unused, meaning I have to temporarily get rid
of the variable which is a nuisance.

e.g.
package main

func main() {
    var n int
}

produces
test.go:4: n declared and not used
and no object file

Preferred: same warning, but also an object file</pre>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
<a href="http://golang.org/doc/devel/release.html" rel="nofollow">http://golang.org/doc/devel/release.html</a>  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What does 'go version' print?
go1.4rc1 darwin/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. install go from source code to build cross-compiler for android by 
        cd $GOROOT/src &amp;&amp; \
    ./all.bash &amp;&amp; \
    CC_FOR_TARGET=$NDK_ROOT/bin/arm-linux-androideabi-gcc GOOS=android GOARCH=arm GOARM=7 ./make.bash

2. after install go from source code, there is no issue to build
golang.org/x/mobile/example/basic for target android by ./make.bash in that folder. The
android program can be successfully built.

3.  But it have issue to build host darwin/amd64 cgo enabled code by 
     go build local_cgo_enabled_folder or
     CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build local_cgo_enabled_folder

What happened?
    cc1: error: unrecognized command line option '-m64'

What should have happened instead?
   build successfully.

Please provide any additional information below.</pre>