//main.c
#include "stdio.h"
void f(){
printf("Welcome to emacs's world!");
return;
}
void call_f(void (*f)()){
(*f)();
return;
}
void main(){
call_f(f);
return;
}
I use cscope to find the definition of function "call_f", but have no result, the cscope can't find the definition of "call_f".
I change the argument type of function "call_f" to another type except for a function pointer.
#include "stdio.h"
void f(){
printf("Welcome to emacs's world!");
return;
}
void call_f(/* void (*f)() */void){
// (*f)();
f();
return;
}
void main(){
// call_f(f);
call_f(void);
return;
}
Then cscope can find the definition of function "call_f". Is that a bug?