Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

(v3.7.0) C: gcc

LCD 47 edited this page Oct 6, 2015 · 1 revision

Maintainer: Gregor Uhlenheuer [email protected]

Checker options

The following options are supported:

g:syntastic_c_compiler (string; default: 'gcc', or 'clang' if GCC is not found)
Compiler executable.
g:syntastic_c_errorformat (string; default: unset)
Override for the default errorformat.
g:syntastic_c_remove_include_errors (boolean; default: 0)
By default, errors in files included from the file being checked are shown. Set this variable to 1 to remove messages about errors in included files. Please note that this means syntastic will silently abort checks if there are fatal errors in one of the included files.
g:syntastic_c_compiler_options (string; default: '-std=gnu99')
Compilation flags (such as defines or include directories) to be passed to the checker.
g:syntastic_c_config_file (string; default: '.syntastic_c_config')
File containing additional compilation flags to be passed to the checker, one option per line.
g:syntastic_c_include_dirs (array of strings; default: [])
Include directories to be passed to the checker, in addition to the above compilation flags. You can set this to something like ['includes', 'headers'], and the corresponding -Iincludes -Iheaders will be added to the compilation flags.
g:syntastic_c_no_default_include_dirs (boolean; default: 0)
By default syntastic adds a number of common include directories to the compilation flags, namely -I. -I.. -Iinclude -Iincludes -I../include -I../includes. You can disable this behaviour by setting the above variable to 1.
g:syntastic_c_no_include_search (boolean; default: 0)
By default syntastic looks at the first 100 lines of the file being checked, and tries to determine if it needs to include headers for some common libraries, such as glib or gtk. It then tries to add the corresponding include directories to the compilation flags. You can disable this behaviour by setting the above variable to 1.
g:syntastic_c_auto_refresh_includes (boolean; default: 0)
Used only if g:syntastic_c_no_include_search is set to a false value. By default syntastic searches for common libraries only the first time the current file is checked. Setting the above variable to 1 instructs syntastic to refresh the list of common libraries every time the current file is checked. You can also force a refresh even when the above variable is 0, by unlet-ing the buffer variable b:syntastic_c_includes.
b:syntastic_c_cflags (string; default: unset)
Buffer-local variable. When set, no search for common libraries is performed, and the contents of the variable are added to the compilation flags.
g:syntastic_c_check_header (boolean; default: 0)
If the current file is a header (namely if its extension is h), all checks are silently skipped. You can force syntastic to check header files by setting the above variable to 1.

Note

This checker doesn't call the makeprgBuild() function, and thus it ignores the usual g:syntastic_c_gcc_<option> variables. The only exception is g:syntastic_c_gcc_exec, which can still be used to override the checker's executable.

Clone this wiki locally