Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: with -compiler=gccgo can't compile function pointer type with cgo exported feature #8945
What does 'go version' print? go version devel +a622a4ff09da Fri Jul 18 13:05:21 2014 +0400 linux/amd64 and go version go1.3.1 linux/amd64 What steps reproduce the problem? use go build -compiler=gccgo to compile below code http://play.golang.org/p/77fSej3teX What happened? snyh:xx$go build -compiler=gccgo # _/run/shm/xx In file included from $WORK/_/run/shm/xx/_obj/_cgo_main.c:8:0: ./a.go:4:7: error: conflicting types for ‘success_cb’ //PFunc success_cb; ^ /tmp/go-build297076724/_/run/shm/xx/_obj/_cgo_main.c:5:13: note: previous declaration of ‘success_cb’ was here extern char success_cb; ^ Please provide any additional information below.
The _cgohack_ code is for issue #1334. The change that committed it (http://golang.org/cl/3746041) included a test case, so it should be straightforward to determine whether it is still needed. In any case I'm fairly certain it's not needed for gccgo, and could be omitted when *gccgo is true.
Labels changed: added repo-main, release-go1.5.
Status changed to Accepted.