Author Topic: Intel Compiler 11 -Wbrief option  (Read 3715 times)

halirutan

  • Guest
Intel Compiler 11 -Wbrief option
« on: December 28, 2009, 09:26:07 pm »
Hi,

here (ubuntu 9.04, cb svn 5961, intel icpc (ICC) 11.1 20090511), when I turn on the -Wbrief option of the compiler, the format of the error-messages change to smth. like

test.c(6) (col. 3): error: expected a ";"

the message parser of cb seems to have problems with this additional column number and it's no longer possible to jump to errors.


Cheers
Patrick

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Intel Compiler 11 -Wbrief option
« Reply #1 on: December 28, 2009, 09:39:17 pm »
the message parser of cb seems to have problems with this additional column number and it's no longer possible to jump to errors.
So why don't you adjust it (the related regex) to your needs in the advanced compiler options? Feedback is welcome.
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

halirutan

  • Guest
Re: Intel Compiler 11 -Wbrief option
« Reply #2 on: December 28, 2009, 10:53:44 pm »
Hi,

I didn't know that there's this option. I'm just working a few days with cb.
The original error-regexp in this setting is

Code
([][{}() \t#%$~A-Za-z0-9_:+/\.-]+)\(([0-9]+).:[ \t](.*)

  • why is it allowed here to *not* backslash the first brackets and braces and the slash? Better to say, the regexp is not working when I backslash them!
  • why is the backslashed line-number-brace not closed with its backslashed pendant but with a dot? That was really confusing since I thought there is something missing.

Ok, I tried to insert an unnamed group matching  the space and the (col. ##)

Code
(?:[ \t]\(col\.[ \t][0-9]+\))?

My complete line is then something like

Code
([][{}() \t#%$~A-Za-z0-9_:+/\.-]+)\(([0-9]+)\)(?:[ \t]\(col\.[ \t][0-9]+\))?:[ \t](.*)

This is not working since it seems that here it is not allowed to use unnamed groups with (?:foobar). The problem is that I need that when I want to say the the error-msg is always in the third group.

Anyway, using

Code
([][{}() \t#%$~A-Za-z0-9_:+/\.-]+)\(([0-9]+)\)([ \t]\(col\.[ \t][0-9]+\))?:[ \t](.*)

and the Message with index 4 seems to work..

Note that if you really want to use this then you have to change it in the remark and warnings, ... too. Otherwise this stuff runs through and is matched as an error.

Cheers
Patrick