Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "#if defined(xx)" code highlight
"#if defined(xx)" code highlight [message #1400615] Mon, 14 July 2014 13:09 Go to next message
Giuliano Favro is currently offline Giuliano FavroFriend
Messages: 1
Registered: July 2014
Junior Member
Hi all,
I have a little question about #define and code highlight.

In a project I have some #define in header files, the header files can be included hierarchically in other heder, finally included in the c file.

when I try the following code:

#include "myinclude.h"

#if defined(ddf) && (ddf != 0)
...
#else

#endif


even if the "ddf" is defined somewhere in "myinclude.h" the code under the if branch is greyed and under the else branch are displayed as active.

If I compile the source code the code under #if branch is correctly compiled.

Instead if the define is declared in the project options the if tree is correctly displayed.


How i can do for correcltly display the active code?
Re: "#if defined(xx)" code highlight [message #1403503 is a reply to message #1400615] Thu, 24 July 2014 08:19 Go to previous message
SkConti Berlin is currently offline SkConti BerlinFriend
Messages: 4
Registered: April 2014
Junior Member
Hello,
I have tested your scenario and the highlighting is just fine (ddf is #defined in "types.h" as 1).
Sorry, no big help... Maybe try to "simplify" the #define (do not use other macros in ddf or other #if around ddf).
Previous Topic:Using build variables in Configurations Names
Next Topic:Ignored include paths when using manual makefile
Goto Forum:
  


Current Time: Fri Dec 19 13:40:45 GMT 2014

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

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