Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: halirutan on December 28, 2009, 09:26:07 pm

Title: Intel Compiler 11 -Wbrief option
Post by: halirutan 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
Title: Re: Intel Compiler 11 -Wbrief option
Post by: MortenMacFly 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.
Title: Re: Intel Compiler 11 -Wbrief option
Post by: halirutan 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](.*)


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