User forums > Using Code::Blocks

Lexer bug in macros

(1/2) > >>

carra:
I saw this lexer problem quite a bit ago, but I had forgotten to post it until now. As you may know, preprocessor macros admit embedded comments, very useful to clarify big multiline macros. Let's take this simple iterator macro as an example:


--- Code: ---#define ITER_C_STR( chars )  for( /* empty */; *(chars); (chars)++ )

--- End code ---

If you view this macro in C::B editor, it will highlight it as a macro only up to the comment, and all the rest is colored as if it was normal code and not part of the macro. It seems to be only a lexer issue, since it will compile OK and the macro is even added to autocompletion list correctly.

oBFusCATed:
Confirmed on Linux + r8043...

MortenMacFly:

--- Quote from: carra on July 11, 2012, 09:30:48 am ---It seems to be only a lexer issue, since it will compile OK and the macro is even added to autocompletion list correctly.

--- End quote ---
Please try in SciTE (http://www.scintilla.org/SciTE.html) and if its the same there, file a bug report to the scintilla guys.

carra:
I tried with SciTE 3.20 and the bug is still there. There is a bug listed in scintilla about this (ID: 3487406). BUT, as you see here: http://sourceforge.net/tracker/index.php?func=detail&aid=3487406&group_id=2439&atid=102439

... they report it as already fixed ??
Well, it clearly isn't.

stahta01:

--- Quote from: carra on July 11, 2012, 10:44:54 am ---I tried with SciTE 3.20 and the bug is still there. There is a bug listed in scintilla about this (ID: 3487406). BUT, as you see here: http://sourceforge.net/tracker/index.php?func=detail&aid=3487406&group_id=2439&atid=102439

... they report it as already fixed ??
Well, it clearly isn't.

--- End quote ---

The fix was committed on Date: 2012-06-25 00:25:59 PDT.

Likely you tested code written before that.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version