GCC 7 To Continue Improving Debug Messages, More Helpful Assembly Output

Written by Michael Larabel in GNU on 28 August 2016 at 08:39 AM EDT. 3 Comments
Early on LLVM's Clang compiler offered much better debugging / error messages than GCC but in the past few years the GNU Compiler Collection developers have been working on generating more helpful messages too. With GCC 7 there will will be more improvements in this space and more.

With GCC 7 there will be expanded coverage of suggestions when it comes to misspelled field names being reported. "Fix-it hints" are now added to the suggestions, including misspelled functions, macro names, enums, type names, named initializers, and also directives with the pre-processor.

When GCC emits warnings about format strings, the relevant part is also now automatically underlined. GCC's C++ front-end will also provide fix-it hints about missing semicolons. When it comes to using GCC, gcc and g++ will also provide suggestions for misspelled arguments to CLI options and the compiler will also provide suggestions for misspelled parameters.

These are just the improved diagnostics so far for GCC 7 with there still being several months left of development.

When it comes to using -fverbose-asm for dumping the Assembly representation, in addition to explaining the meaning of those Assembly expressions it now also shows the source lines that correspond to the given Assembly. Thus it should be much easier understanding the Assembly output especially for those not well experienced.

Some other GCC 7 changes so far include improvements to the libgccjit just-in-time library's API, an internal unit-testing framework for GCC, and libstdc++ has much better experimental support for C++17. Some examples of the output changes and more expressive Assembly output can be found via the tentative GCC 7 changes page that was recently setup. GCC 7 won't be released until a few months into 2017 so there still is much more time for additional features still to land. Stay tuned for GCC 7 feature coverage along with compiler benchmarks on Phoronix.
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