Skip to content

cmd/cgo: with -compiler=gccgo can't compile function pointer type with cgo exported feature #8945

@gopherbot

Description

@gopherbot

by Snyh1010:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions