Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT does not index code between #if .... #endif(CDT does not index code between #if .... #endif)
CDT does not index code between #if .... #endif [message #1751737] Fri, 13 January 2017 10:06 Go to next message
Ani Mising name is currently offline Ani Mising nameFriend
Messages: 2
Registered: January 2017
Junior Member
I am using CDT version 9.x.x with eclipse Neon. I am using the CDT APIs to get the function calls inside of a function. When a conditional compilation statement as below is encountered this version of CDT is not getting the function calls inside #if statement rather gets the call in #else. In the below example it extracts func3() but func2() is expected as the macro NLC_LS_AVL is defined to 1 in the header file and if we preprocess the C file the function call inside #if i.e. func2(), by the pre-processor.

The same code works in eclipse Indigo and CDT 8.0.2 where the function calls inside #if are extracted i.e. func2() is extracted.

Is there any additional configuration that needs to be taken care for CDT 9.X.X for it get the right active code for conditional compilation statements? If so can anyone suggest?

Exmaple:

\#if (NLC_LS_AVL == 1)
&ensp;func2(); <br>
\#else<br>
&ensp;func3();<br>
\#endif








Re: CDT does not index code between #if .... #endif [message #1751775 is a reply to message #1751737] Fri, 13 January 2017 17:27 Go to previous message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 404
Registered: June 2014
Senior Member
I can't reproduce this problem. Try to rebuild your index (right-click on project -> Index -> Rebuild - sometimes the index does not see a change to a header file, especially if the header file is not in the project.

HTH,
Jonah
Previous Topic:Two attempts to start gdbserver for C/C++ remote debug?
Next Topic:Artefacts in Eclipse Neon.2 code editor
Goto Forum:
  


Current Time: Wed Jan 26 00:09:20 GMT 2022

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

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

Back to the top