I have the following code:
long fp = ... void (*ptr)(long, char*, char*) = fp;
Long fp is a valid pointer to a function that comes in as long. I get the standard warning "make pointer from int without cast". I want to compile with:
-std=iso9899:1990 -pedantic-errors
which turns this warning into an error message. The question is, what is the correct translation? I tried various guesses, for example:
void (*ptr)(long, char*, char*) = (void)(*)(long, char*, char*) fp;
But it seems he canβt find the right one.
gubby source share