GCC Might Finally Have A Static Analysis Framework Thanks To Red Hat

Written by Michael Larabel in GNU on 17 November 2019 at 04:52 AM EST. 20 Comments
GNU
Clang's static analyzer has become quite popular with developers for C/C++ static analysis of code while now the GNU Compiler Collection (GCC) might finally see a mainline option thanks to Red Hat.

Red Hat's David Malcolm has proposed a set of 49 patches that appear to be fairly robust and the most we have seen out of GCC static analysis capabilities to date.

This GCC static analysis framework can easily report use after free errors, double frees, and other common C coding issues that are detectable via static analysis. The implementation is quite interesting and opens the doors for GCC a lot but in using this --analyzer pass roughly doubles the compile times.

This GCC static analysis framework comes in at around forty-two thousand lines of code. The work in more detail can be found on the GCC mailing list.

Given the timing, however, it's becoming tight to see this reviewed and merged in time for GCC 10 so more than likely it would be delayed a year for GCC 11.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week