Error message parsing for gcc 4.7.2 on Debian appears to be slightly broken. The brief
format for gcc errors and warnings looks like "file:line:column: error|warning: message".
Neither the "generic" regex nor the "Emacs" one quite match this and as a result all
gcc errors and warnings are passed to ErrorList as errors. Suggest new regex for
gcc error parsing:
Error: (.+):(\d+):\d+: (?:error|Error): (.+)
Warning: (.+):(\d+):\d+: (?:warning|Warning): (.+)
jEdit 5.0, Console 5.0, Debian Linux Wheezy 64-bit, Java 1.6.0_24.
| Submitted | bobhwasatch - 2012-11-23 - 21:44:53z | Assigned | nobody |
|---|---|---|---|
| Priority | 5 | Category | None |
| Status | Open | Group | None |
| Resolution | None | Visibility | No |
| 2012-11-28 - 05:59:56z ezust |
Is there an "extra lines" regexp for this also? |
|---|---|
| 2012-11-30 - 14:02:08z bobhwasatch |
I am not aware of GCC producing multi-line error messages for the C compiler. It may
do so for C++ or Ada or something, but I don't use those. Also, the regex that I suggested work with gcc 4.7, but not with older versions that don't provide the column number. So I think I need to do more testing to ensure that the regex works for both styles. |
| 2012-12-05 - 23:35:35z snarum-micron |
GCC can produce multiline error messages. Here is what I use: Error: ^([^:]+):(\d+):(?:\d*:)?\s*((fatal )?error:.*)$ Warning: ^([^:]+):(\d+):(?:\d*:)?\s*(warning:.*)$ Extra: ^([^:]+:\d+:\d+: note:.*)$ Here's an example of a multi-line: Ftl\AtlasII/MetaRecord.h:70:3: error: redefinition of typedef 'PageStripeDef' Ftl\AtlasII/BlockStripeContainer.h:36:31: note: previous declaration of 'PageStripeDef' was here (only 2 lines, the 2nd will probably wrap :( ) |
| 2012-12-07 - 19:30:58z bobhwasatch |
Ok, I see what "extra lines" does now. I changed the regex to: Extra lines: ^([^:]+:\d+:(?:\d*:)?\s*note:.*)$ This handles the older versions of gcc that don't give a column number. The error and warning strings work fine for me as Steve had them. |