Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Intel Compiler 11 -Wbrief option

(1/1)

halirutan:
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

MortenMacFly:

--- Quote from: halirutan on December 28, 2009, 09:26:07 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.

--- End quote ---
So why don't you adjust it (the related regex) to your needs in the advanced compiler options? Feedback is welcome.

halirutan:
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](.*)
--- End code ---


* 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]+\))?
--- End code ---

My complete line is then something like


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

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](.*)
--- End code ---

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

Navigation

[0] Message Index

Go to full version