You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.7rc1 windows/amd64
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:/work/go/
set GORACE=
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=c:\temp\go-build108228690=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
I don't think we'd want vet to complain about such code. That's a fairly typical way to add debugging code, particularly in hot functions where you can't accept any runtime overhead when not debugging.
Code is silently eliminated by the compiler. And no warnings from vet.
Maybe it makes sense to add -report-eliminated-code flag to the compiler or vet? Just an idea.
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.7rc1 windows/amd64
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:/work/go/
set GORACE=
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=c:\temp\go-build108228690=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
go tool vet -unreachable main.go
a warning from vet
no warnings
The text was updated successfully, but these errors were encountered: