set default C compiler options
This commit is contained in:
parent
c11c97da8b
commit
6ce5880b81
@ -64,17 +64,19 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('g:syntastic_c_compiler_options')
|
||||
let g:syntastic_c_compiler_options = '-std=gnu99'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_c_GetLocList()
|
||||
let makeprg = 'gcc -fsyntax-only -std=gnu99 '
|
||||
let makeprg = 'gcc -fsyntax-only '
|
||||
let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '.
|
||||
\ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '.
|
||||
\ 'each function it appears%.%#,%-GIn file included%.%#,'.
|
||||
\ '%-G %#from %f:%l\,,%f:%l:%c: %m,%f:%l: %trror: %m,%f:%l: %m'
|
||||
|
||||
" add optional user-defined compiler options
|
||||
if exists('g:syntastic_c_compiler_options')
|
||||
let makeprg .= g:syntastic_c_compiler_options
|
||||
endif
|
||||
let makeprg .= g:syntastic_c_compiler_options
|
||||
|
||||
let makeprg .= ' '.shellescape(expand('%')).
|
||||
\ ' '.syntastic#c#GetIncludeDirs(0)
|
||||
|
Loading…
Reference in New Issue
Block a user