Bug #18810 2012-11-26 10:32

athar

Syntax highlight ignores predefined macros

The syntax highlighting always grays out code surrounded by #ifdef if the macro is a predefined macro or a global macro defined via -D, e.g.:

#ifdef __x86_64__

This is gray, even if the current build target architecture is x86_64

#else

This always appears normally, even when it shouldn't

#endif

Note: in the case of GCC, you can retrieve a list of predefined macros with

gcc -dM -E ...

Category
Application::Editor
Group
 
Status
Open
Close date
 
Assigned to
 
alpha0010 2012-11-26 22:04

Is this option enabled?

Settings->Editor->C/C++ Editor settings->Include host platform defines

ID_63166 2012-11-29 00:02

I also find this to be a problem, and I do have Settings->Editor->C/C++ Editor settings->Include host platform defines checked

athar 2012-11-29 09:20

It seems to work for me when I enable that option.

Is there any reason that this is not enabled by default?

athar 2012-11-29 09:30

Macros specified via -D or under #defines in the build settings also work in principle, but for some reason it always requires reopening the project TWICE before they are recognized.