with this problem on Mac with gcc 4.0.1 build 5370, Xcode 2.5. Code snippet:
there is a declared function, the second parameter causes the problem:
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
calls it this way:
typedef void (*FuncPtr)();
FuncPtr func = some_function_pointer;
ffi_call(null, func, ...);
causes an error in the third line. Looks like: "void func (void)" is different from "void func ()" for gcc 4.0.1
Any ideas on any gcc switch or just a gcc update to help? Thanks for the help of Honza B.
Honza b
source
share