Solved: Why does it have to be static?

void function F ( int *P) { P = 42 ; }

That will take the integer pointer "P" and set it to be at address 42. Is that what you really want?

Surely you mean:

void function F ( int *P) { *P = 42 ; }

which will assign the value 42 to the variable pointed to by "P".