Hi all,
The following code will trick the cscope to think that "int parm" is a local variable within a function called "defined" instead of a global variable; therefore, when you try to search for symbol "parm" under cscope "Find this global definition:", you won't be able to find it. Consider the code below.
#include <stdio.h>
#if defined(__FOO1__) \
|| defined(__FOO2__) /* <<- this line continuation causes cscope to seeing parm as local instead of global */
#define SOMETHING
#endif
int parm;
int main ()
{
parm = 2;
printf ("parm=%d\n", parm);
}
The cscope properly detects "int parm" in the code segment below.
#include <stdio.h>
#if defined(__FOO1__) || defined(__FOO2__)
#define SOMETHING
#endif
int parm;
int main ()
{
parm = 2;
printf ("parm=%d\n", parm);
}
Regards,
Adisorn.