Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
[Minor visual bug] Syntax and comments
Oblivion:
Hello.
- Code::Blocks information
Release: 12.11 rev 8629
SDK Version: 1.13.14
Build: Nov 25, 2012, 09:32:38 - wx2.8.12 (Windows, UNICODE) - 32 bit
- The bug information / description
When you use a C++ comment, and have a left parenthesis followed directly by an asterisk: All the code below that line is shown as being 'commented out' (from a C-style comment).
I found this out moments ago while working on a project; Here is a screen shot explaining what I mean:
This is strictly a visual bug. It has no effect on the compilation or anything else of the sort that I am aware of.
I did not bother to search around to see if others have already reported this bug or not; I figure it's harmless by nature.
The offensive code:
--- Code: ---//(*itHit).move(TOP);
--- End code ---
The same offensive code, without the bug being reproduced (a single space):
--- Code: ---// (*itHit).move(TOP);
--- End code ---
That is all. :)
Jenna:
This is not a bug, it's a feature ;) .
And yes, I mean what I said.
--- Code: ---//(*
--- End code ---
[/b] and //*) are used as start and end-tag of the wxSmith-created code.
The code between the tags can (and will) be changed (or resetted) in projects, that use wxSmith every time anything is changed by the wxSmith-plugin.
You can switch this behaviour off by unchecking "Settings -> Editor -> General settings -> C/C++ Editor settings -> Highlight wxSmith sections differently".
wxSmith is the wxWidgets rad-development plugin distributed with the Code::Blocks contrib-plugins.
oBFusCATed:
Jens:
It is a bug in fact and I'm annoyed by this problem, too.
Can we make it a bit more strict that if the //(* is followed by any other characters it won't trigger the change in style?
Jenna:
It's not that easy, because wxSmith also adds text directly behind the asterisk, e.g. //(*AppInitialize .
Jenna:
--- Quote from: oBFusCATed on March 20, 2013, 11:29:03 pm ---Jens:
It is a bug in fact and I'm annoyed by this problem, too.
--- End quote ---
Why is it a bug ?
The only misbehaviour might be (I have to test it), is that this opetion is turned on as default.
I think it's very useful to see which parts of the code are safe to change and which parts might be automatically changed by wxSmith.
And wxSmith has to use start and end tags to find it's code.
I did not see very much reports about this issue (if any).
Anyway it should be tested if such rare comments can conflict with wxSmith and (most worth) whether it can happen that wxSmith overrides code that is not owned by it.
Navigation
[0] Message Index
[#] Next page
Go to full version