News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Syntax highlighting with #if VARNAME = 1

Started by tipofthesowrd, December 17, 2014, 11:39:40 AM

Previous topic - Next topic

tipofthesowrd

I noticed a small issue using the nightly Windows build (SVN 10035) of Code::Blocks.

In an external library I'm using a lot of the subfiles are included as #if VARNAME where varname is: #define VARNAME 1
The syntax highlighting in the editor is a little off since it recognizes this statement as false and the code is correspondingly grayed out.

I checked that #if defined VARNAME is correctly identified.
So is #if 1. Only #if VARNAME is not found to be true.

Is there an option to add this definition to the editor or is this an actual bug?


oBFusCATed

It is not a bug, but limitation of the feature.
(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!]

tipofthesowrd

Okay  ;D I'll post a CR (Change Request) for this feature in the bug tracker  :P