Get sizeof a void (*)() function pointer in C -
to aid precise memory allocation i'm doing in c
, i'm trying sizeof
function pointer function return type void takes no parameters.
however, when sizeof (void (*)())
, generate compiler warning:
function declaration isn’t prototype [-wstrict-prototypes]
how size i'm looking for?
that old style function definition, missing argument list, add them:
sizeof( void(*)(void) )
Comments
Post a Comment