On 03/07/2011 08:36 AM, Stefan Hajnoczi wrote:
Technically void (*)() is an obsolete type in standard C.
I can switch to void (*)(void) but it requires casting and requires a
typeof() :-/
You're right, void (*)(void) is the proper form for a general function
pointer. I think doing this in a portable way is worthwhile.
Yeah, using a function pointer is definitely better than using a void
*. We'll just have to live with the use of typeof() though which
fortunately is supported in some form by basically every compiler out there.
Regards,
Anthony Liguori
Stefan