Remove -fsyntax-only in common_flags or make it an option
mandeep opened this issue · 4 comments
The -fsyntax-only flag is nice, however it doesn't allow some checks to be run. Especially if an optimization level like -O3 is given. One example is -Wreturn-type: this error won't be shown by the linter when the -fsyntax-only flag is given. One remedy would be to remove the -fsyntax-only flag completely. Another option would be to move the flag to extra_flags so that the user can easily remove it if needed.
https://github.com/jfcherng/SublimeLinter-contrib-gcc/blob/master/linter.py#L72
Did you code in C?
I found persist.get_syntax(self.view) always return 'c++'
somehow. No matter open a .c
file or use C
syntax.
Update: Sorry my bad. It's my old mapping.
Ok. I could reproduce it with flags -std=c90
main () {
return 0;
}
Done in 1.2.2
.
Thanks!