External global variables parsing problem in C project [message #801278] |
Sat, 18 February 2012 05:41 |
Roger M Messages: 2 Registered: February 2012 |
Junior Member |
|
|
I am new to CDT, and just find this IDE works very good with my project, thanks all the contributors. But I have a problem about external global variables parsing.
If the key word "extern" is outside of a function, parsing is fine.
//in a.c
int foo;
//in b.c
extern int foo;
void somefunc()
{
foo = 1; //works fine for eclipse
}
But if "extern" is inside a function (I know it's very ugly coding style, but I cannot change it, enormous such examples in code), seems eclipse will take it as a local variable. That's very inconvenient when I have to search the references of a global variable.
//in a.c
int foo;
//in b.c
void somefunc()
{
//some code here
{
extern int foo;
foo = 1; //eclipse takes foo as local variable, cannot be correctly parsing
}
}
Any solution for this? I love this IDE, it's free but very powerful for C/C++. But if I cannot get this problem solved, I have to give it up.
Environment: Windows XP SP3 + CDT Version: 8.0.0.201109151620
[Updated on: Sat, 18 February 2012 07:30] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02886 seconds