Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
syntax highlight
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: syntax highlight (Read 5956 times)
linsys
Single posting newcomer
Posts: 4
syntax highlight
«
on:
May 04, 2015, 03:46:29 pm »
Hello,
I've found a strange behavior in syntax highlight related to
WIN32, _WIN32, __WIN32, __WIN32__ symbols, it appear as if they
are always defined but only in syntax highlight.
I've attached a captured image to better explain
Best Regards
Logged
linsys
Single posting newcomer
Posts: 4
Re: syntax highlight
«
Reply #1 on:
May 05, 2015, 11:40:07 pm »
well after same more testing it come out that in:
Settings->editor->C/C++ Editor settings
options:
- Collect defines from project file
- Include host platform defines
changes this behavior, but not in the expected way:
it appear as if definitions from host and project have
precedence over definitions in local file
Logged
linsys
Single posting newcomer
Posts: 4
Re: syntax highlight
«
Reply #2 on:
May 06, 2015, 12:45:01 am »
ok got it, the collector collect
all #define but not the #undef
like in the following example
#define T1
#undef T1
#if defined T1
#warning "defined"
#define TEST() printf("defined")
#else
#warning "not defined"
#define TEST() printf("not defined")
#endif
int main()
{
TEST();
return 0;
}
Logged
oBFusCATed
Developer
Lives here!
Posts: 13406
Re: syntax highlight
«
Reply #3 on:
May 06, 2015, 01:15:22 am »
As you've already found this is a pretty basic feature by design and also it is implemented in our editor component which is provided by the Scintilla project.
The only thing we can do is implement our own semantic highlight, but no one has done it yet, unfortunately.
Logged
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]
linsys
Single posting newcomer
Posts: 4
Re: syntax highlight
«
Reply #4 on:
May 06, 2015, 01:17:09 pm »
as you pointed also SciTE suffer of this bug, it appear that exist a two year old lexUndef.patch
I will investigate furter.
thank you
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
General (but related to Code::Blocks)
»
syntax highlight