Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » External global variables parsing problem in C project(parsing problem)
External global variables parsing problem in C project [message #801278] Sat, 18 February 2012 05:41 Go to next message
Roger M is currently offline Roger MFriend
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

Re: External global variables parsing problem in C project [message #801645 is a reply to message #801278] Sat, 18 February 2012 18:45 Go to previous message
Roger M is currently offline Roger MFriend
Messages: 2
Registered: February 2012
Junior Member
Any comments?
Previous Topic:Projects lose standard build-in include folders causing indexer problem
Next Topic:How to regenerate a subdir.mk?
Goto Forum:
  


Current Time: Wed Apr 24 20:01:33 GMT 2024

Powered by FUDForum. Page generated in 0.02886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top