User forums > Using Code::Blocks

Syntax highlighting with #if VARNAME = 1

(1/1)

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.

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

Navigation

[0] Message Index

Go to full version