gccgo branch and darwin
Ian Lance Taylor
iant@google.com
Wed Dec 1 22:10:00 GMT 2010
Arnaud Lacombe <lacombar@gmail.com> writes:
> On Fri, Nov 19, 2010 at 11:58 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
>> sysinfo.go:2874:13: error: use of undefined type 'func___sighandler_t'
>>
> gen-sysinfo.go has :
>
> // type ___sighandler_t func*(int32)
That is not valid Go, so this looks like a bug in godump.c. What does
the type __sighandler_t look like in the .h file?
On GNU/Linux it looks like this in the .h file:
typedef void (*__sighandler_t) (int);
and I get this in gen-sysinfo.go:
type ___sighandler_t func(int32)
Thanks.
> I have not been able to find much
> info on function pointer in the specs, but I certainly did not look at
> the right place.
In Go a function type is written simply as
func(PARAMETER-TYPES) RESULT-TYPES
This is the type which in C would be called a pointer to function type.
Go does not have any type which corresponds to the C function type, as
opposed to the C pointer to function type.
Ian
More information about the Gcc
mailing list