diff --git a/syntax_checkers/c.vim b/syntax_checkers/c.vim index 55b06de8..6080316d 100644 --- a/syntax_checkers/c.vim +++ b/syntax_checkers/c.vim @@ -106,8 +106,9 @@ function! SyntaxCheckers_c_GetLocList() " determine whether to parse header files as well if expand('%') =~? '.h$' if exists('g:syntastic_c_check_header') - let makeprg = 'gcc -c '.shellescape(expand('%')). - \ ' '.syntastic#c#GetIncludeDirs('c') + let makeprg = 'gcc -c '.shellescape(expand('%')) . + \ ' ' . g:syntastic_c_compiler_options . + \ ' ' . syntastic#c#GetIncludeDirs('c') else return [] endif diff --git a/syntax_checkers/cpp.vim b/syntax_checkers/cpp.vim index 52edfe10..b5ce6fb1 100644 --- a/syntax_checkers/cpp.vim +++ b/syntax_checkers/cpp.vim @@ -66,7 +66,7 @@ " " Set your compiler executable with e.g. (defaults to g++) " -" let g:syntastic_cpp_compiler = 'clang++' +" let g:syntastic_cpp_compiler = 'clang++' if exists('loaded_cpp_syntax_checker') finish @@ -107,8 +107,8 @@ function! SyntaxCheckers_cpp_GetLocList() if expand('%') =~? '\%(.h\|.hpp\|.hh\)$' if exists('g:syntastic_cpp_check_header') - let makeprg = g:syntastic_cpp_compiler.' -c '.shellescape(expand('%')). - \ ' ' . g:syntastic_cpp_compiler_options. + let makeprg = g:syntastic_cpp_compiler.' -c '.shellescape(expand('%')) . + \ ' ' . g:syntastic_cpp_compiler_options . \ ' ' . syntastic#c#GetIncludeDirs('cpp') else return []