I am trying to verify the following piece of code using frama-c
/*@ ensures \result != \null;
@ assigns \nothing;
@*/
extern int *new_value();
//@ assigns *p;
void f(int* p){
*p = 8;
}
//@ assigns \nothing;
int main(void){
int *p = new_value();
f(p);
}
The prover is unable to prove that main assigns \nothing, which makes sense, as main assigns to *p through function f. However, how should I state that in \assigns clause, since p is local variable and can not be accessed within annotation.