Add an option to enable GCC 10+ analyzer
ddassie-texa opened this issue · comments
GCC has added an integrated static analyzer, it started it's life in GCC10 as an experimental feature, it would make sense to add an option to enable it, or just add "-fanalyzer" to the GCC warnings, it could also be treated similarly to the other analyzers like clang-tidy with the caveat that it only works when compiling with GCC 10 or newer.
See: https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html
Support for C++ is not ready yet - https://developers.redhat.com/articles/2022/04/12/state-static-analysis-gcc-12-compiler#toward_support_for_c__
Maybe it can be enable for C projects only
Yeah, I'm using it for C projects.