gcc.vim (1560B)
1 " Vim compiler file 2 " Compiler: GNU C Compiler 3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4 " Last Change: 2010 Oct 14 5 " changed pattern for entering/leaving directories 6 " by Daniel Hahler, 2019 Jul 12 7 " added line suggested by Anton Lindqvist 2016 Mar 31 8 " 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) 9 " 2025 Dec 17 by The Vim Project (correctly parse: 'make: *** [Makefile:2: all] Error 1') 10 " 2026 May 28 by The Vim Project (Use %v to parse column number) 11 12 if exists("current_compiler") 13 finish 14 endif 15 let current_compiler = "gcc" 16 17 let s:cpo_save = &cpo 18 set cpo&vim 19 20 CompilerSet errorformat= 21 \make:\ ***\ [%f:%l:\ %m, 22 \%*[^\"]\"%f\"%*\\D%l:%c:\ %m, 23 \%*[^\"]\"%f\"%*\\D%l:\ %m, 24 \\"%f\"%*\\D%l:%c:\ %m, 25 \\"%f\"%*\\D%l:\ %m, 26 \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once, 27 \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.), 28 \%f:%l:%v:\ %trror:\ %m, 29 \%f:%l:%v:\ %tarning:\ %m, 30 \%f:%l:%v:\ %m, 31 \%f:%l:\ %trror:\ %m, 32 \%f:%l:\ %tarning:\ %m, 33 \%f:%l:\ %m, 34 \%f:\\(%*[^\\)]\\):\ %m, 35 \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, 36 \%D%*\\a[%*\\d]:\ Entering\ directory\ %*[`']%f', 37 \%X%*\\a[%*\\d]:\ Leaving\ directory\ %*[`']%f', 38 \%D%*\\a:\ Entering\ directory\ %*[`']%f', 39 \%X%*\\a:\ Leaving\ directory\ %*[`']%f', 40 \%DMaking\ %*\\a\ in\ %f 41 42 if exists('g:compiler_gcc_ignore_unmatched_lines') 43 CompilerSet errorformat+=%-G%.%# 44 endif 45 46 let &cpo = s:cpo_save 47 unlet s:cpo_save