summaryrefslogtreecommitdiff
path: root/ale_linters/cpp/gcc.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/cpp/gcc.vim')
-rw-r--r--ale_linters/cpp/gcc.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/cpp/gcc.vim b/ale_linters/cpp/gcc.vim
index c427020b..108d6d70 100644
--- a/ale_linters/cpp/gcc.vim
+++ b/ale_linters/cpp/gcc.vim
@@ -9,7 +9,11 @@ function! ale_linters#cpp#gcc#GetCommand(buffer, output) abort
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
- return '%e -S -x c++ -fsyntax-only'
+ "
+ " `-o /dev/null` or `-o null` is needed to catch all errors,
+ " -fsyntax-only doesn't catch everything.
+ return '%e -S -x c++'
+ \ . ' -o ' . g:ale#util#nul_file
\ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ale#Pad(l:cflags)
\ . ale#Pad(ale#Var(a:buffer, 'cpp_gcc_options')) . ' -'