Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: vergamota on September 12, 2007, 05:33:19 pm
-
I found a bug, and it is easy reproduceble.
First of all, sorry if I am posting in the wrong place, and my terrible english, or something like that, but I'm just trying to help the Code::Blocks devellopment.
Before I post it, I've got the last nightly version (4461, september 11), and the problem remains.
In C, when it has the backslash ( \ ) caracter before a new line caracter, the new line caracter is "deleted" from compilation.
So, it will join this line with the next one, even it is a commented line.
Example:
int Test()
{
return 0;
//This is a comment\\
}
We got an error, cause the MingW compiler and MS compiler recognize like a commented line "}", and it will be asking for a "}" caracter at the end, but the Code Blocks IDE doesn't show this line like a comment, and the compiler gets the error.
The unique IDE that I found, able to solve this problem is the Microsoft Visual C++ 2008 Beta 2. (I didn't try with older version of Visual Studio)
Best regards.
-
This is not a C::B bug. Even if it's a bug, it should be reported to the respective compiler development teams. :)
-
So if I understand correctly, the fact that Gcc is reporting an error for your example is right. What is not is the fact that, in CB editor, the following line (which is part of the comment) is not colored as a comment.
I guess that is a Scintilla text editor problem. Also, is there any reason for the double backslash in the example?
Regards, XayC
-
I guess that is a Scintilla text editor problem. Also, is there any reason for the double backslash in the example?
You are quite right. This is a Scintilla bug. You may consider reporting this to the Scintilla development team. :)
-
OK!
I'm going to do that guys!
Thank you!
And sorry by posting it here...
I didn't know that the highlighting is done by Scintilla.
Best Regards.