Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: demone on June 01, 2013, 01:13:26 pm

Title: C::B code editor bug
Post by: demone on June 01, 2013, 01:13:26 pm
Another little bug

In the code editor the macro are "greyened" depending on the fact if a something is defined or not, there's a little bug on windows:

#if defined(_WIN32) || defined(__WIN32__)


The 2 macros

_WIN32

__WIN32__

Are not detected. So the code is showed disabled, but in reality when compiling it is enabled.

I have custom tool chain GCC 4.8


In previous version of C::B the bug was not present (I already selected "this compile target is for Window" from the check boxes)
Title: Re: C::B code editor bug
Post by: demone on June 02, 2013, 01:56:22 am
there are missing keywords for sintax highlighting..

for now i found missing

"ostream"

don't know if would be usefull adding these keywords too..

flush
endl

maybe not.
Title: Re: C::B code editor bug
Post by: MortenMacFly on June 02, 2013, 09:31:43 am
for now i found missing
"ostream"
You can do it yourself by adding these to the C++ lexer. Its a XML file which you can edit.
Title: Re: C::B code editor bug
Post by: Folco on June 02, 2013, 09:51:25 am
The best and simplest way is to use C::B interface (settings -> syntax highlighting) instead of editing XML file by hand.
Title: Re: C::B code editor bug
Post by: demone on June 02, 2013, 11:25:24 am
infact I added missing words (reading at long list of "std::XXstream" included in highlighting i thought maybe you wanted to add also "ostream" for next release). ;)... There's still the bug for __WIN32 and _WIN32_ not recognized by editor. Is there anyway to specify "I'm compiling on Windows FOR windows" and get correct code showed?