c/c++: force language in compiler invocation.
That way, the files are properly treated as C/C++ even when they don't have the standard file extension Signed-off-by: Florent Bruneau <florent.bruneau@intersec.com>
This commit is contained in:
parent
4b0b81cddc
commit
29d5b88e27
@ -89,7 +89,7 @@ if !exists('g:syntastic_c_config_file')
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_c_GetLocList()
|
||||
let makeprg = g:syntastic_c_checker . ' -fsyntax-only '
|
||||
let makeprg = g:syntastic_c_checker . ' -x c -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%.%#,'.
|
||||
|
@ -92,7 +92,7 @@ if !exists('g:syntastic_cpp_config_file')
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_cpp_GetLocList()
|
||||
let makeprg = g:syntastic_cpp_compiler . ' -fsyntax-only ' .
|
||||
let makeprg = g:syntastic_cpp_compiler . ' -x c++ -fsyntax-only ' .
|
||||
\ g:syntastic_cpp_compiler_options
|
||||
let errorformat = '%-G%f:%s:,%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: '.
|
||||
\ '%m,%f:%l:%c: %m,%f:%l: %trror: %m,%f:%l: %tarning: %m,'.
|
||||
|
Loading…
x
Reference in New Issue
Block a user