Author Topic: C::B code editor bug  (Read 7391 times)

Offline demone

  • Multiple posting newcomer
  • *
  • Posts: 36
C::B code editor bug
« 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)
« Last Edit: June 01, 2013, 01:18:32 pm by demone »
processor: Intel Core 2 Quad.
ram: 4 GB
os: Vista
gfx card: Ati Radeon HD 5570

Offline demone

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: C::B code editor bug
« Reply #1 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.
processor: Intel Core 2 Quad.
ram: 4 GB
os: Vista
gfx card: Ati Radeon HD 5570

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: C::B code editor bug
« Reply #2 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: C::B code editor bug
« Reply #3 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.
Kernel Extremist - PedroM power ©

Offline demone

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: C::B code editor bug
« Reply #4 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?
processor: Intel Core 2 Quad.
ram: 4 GB
os: Vista
gfx card: Ati Radeon HD 5570