Skip to main content



      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 05:06 Go to next message
Eclipse UserFriend
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 12:27 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 20:37:19 EDT 2025

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

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

Back to the top