2 ms·
There is the GCC static analyzer and the LLVM equivalent: https://lwn.net/Articles/869880/ https://lwn.net/Articles/869880/ https://gcc.gnu.org/onlinedocs/gcci
by pabs3 5y ago
There is the GCC static analyzer and the LLVM equivalent:
https://lwn.net/Articles/869880/ https://lwn.net/Articles/869880/
https://gcc.gnu.org/onlinedocs/gccint/Static-Analyzer.html https://gcc.gnu.org/onlinedocs/gccint/Static-Analyzer.html
https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer
https://developers.redhat.com/blog/2021/01/28/static-analysis-updates-in-gcc-11/ https://developers.redhat.com/blog/2021/01/28/static-analysi...
https://clang-analyzer.llvm.org/scan-build.html https://clang-analyzer.llvm.org/scan-build.html
- jsteemann 5y agoClang's scan-build supports C++ for a long time already. Regarding gcc/g++, there seems to be support only for C. From https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer https://gcc.gnu.org/wiki/DavidMalcolm/StaticAnalyzer: > Initial implementation was added in GCC 10; major rewrite occurred in GCC 11. > Only C is currently supported (I hope to support C++ in GCC 13, but it is out-of-scope for GCC 12) Looking forward to seeing C++ support added to it!
- rwmj 5y agoI've found loads of bugs in the C support and David has been very responsive to my bug reports, even substantially reworking how realloc(3) was being handled because of a case we found. (Edit: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99260 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99260 - I must get around to testing his fix since GCC 12 is in Fedora now)