Author Topic: Syntax highlighting with #if VARNAME = 1  (Read 2241 times)

Offline tipofthesowrd

  • Single posting newcomer
  • *
  • Posts: 5
Syntax highlighting with #if VARNAME = 1
« on: December 17, 2014, 11:39:40 am »
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?

 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Syntax highlighting with #if VARNAME = 1
« Reply #1 on: December 17, 2014, 11:28:13 pm »
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!]

Offline tipofthesowrd

  • Single posting newcomer
  • *
  • Posts: 5
Re: Syntax highlighting with #if VARNAME = 1
« Reply #2 on: December 24, 2014, 02:10:13 pm »
Okay  ;D I'll post a CR (Change Request) for this feature in the bug tracker  :P