This was originally posted to vim@vim.org but I've not
had a reply.  Maybe it's better posted here, anyway.  This 
is the concise form of the message.  Longer versions are
in the archives, but I'll explain more if needed.

---------- Forwarded message ----------
Date: Mon, 27 Nov 2006 10:39:16 +0000 (WET)
From: Hugh Sasse <[EMAIL PROTECTED]>
To: Vim Help list <vim@vim.org>
Subject: Shortened: debugging errorformat strings.

I have been trying to improve the quickfix facilities 
obtainable from gcc and I have modified it thusly:

--- /usr/local/share/vim/vim70/compiler/gcc.vim 2006-07-19 18:11:22.117752000 
+0100
+++ /home/hgs/.vim/compiler/gcc.vim     2006-11-22 18:33:39.269332000 +0000
@@ -16,6 +16,8 @@
       \\"%f\"%*\\D%l:\ %m,
       \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ 
once,
       \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
+      \%E%f:%l:\ multiple\ definitions\ of\ %m,
+      \%Z%*\\s:%f:%l:\ first\ defined\ here,
       \%f:%l:\ %m,
       \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
       \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',

But when I get results like:

/home/hgs/fsv/rawimage.c:97: multiple definition of `image_check_is_png'
image.o:/home/hgs/fsv/image.c:97: first defined here

vim tries to pickup a file called image.o:/home/hgs/fsv/image.c 
for the second line (:cn) which clearly doesn't exist.

I have tried the following forms of this second line in order to modify
what is detected before the %f :-

      \%Z%*\\s:%f:%l:\ first\ defined\ here,
      \%Z%.%#:%f:%l:\ first\ defined\ here,
      \%Z%*[^:]:%f:%l:\ first\ defined\ here,
      \%Z%m:%f:%l:\ first\ defined\ here,
      \%Z%*f:%f:%l:\ first\ defined\ here,

The latter of which complains about 2 %f symbols in the line, despite the
first having a * in it.

How do I NOT pickup the object file before the ":%f:\ first\ defined\ here"?

        Hugh

Reply via email to