New features in GCC 16: Improved error messages and SARIF output -- David Malcolm
GCC 16 is about to be released, so I'm sharing some of the new features I worked on this year. Some changes are visible to users, while others improve the system more subtly.
New features in GCC 16: Improved error messages and SARIF output
by David Malcolm
From the article:
A well-known challenge for C++ developers is the readability of template-related error messages. C++ compilers tend to either provide too little information or spew screenfuls of text at you. Either way, the errors can be difficult to decipher.
GCC error messages have a hierarchical structure to them. In GCC 15, I added an experimental option that shows this structure as a collection of nested bullet points.
In GCC 16, this behavior is now the default. You can return to the previous behavior using -fno-diagnostics-show-nesting or -fdiagnostics-plain-output. I fixed several bugs and made use of the hierarchical structure in more places. For example, it is easy to get declarations and definitions out of sync when manually adding
constto a parameter:class foo{public:void test(int i, int j, void *ptr, int k);};// Wrong "const"-ness of param 3.void foo::test(int i, int j, const void *ptr, int k){}

Registration is now open for CppCon 2026! The conference starts on September 12 and will be held
Registration is now open for CppCon 2026! The conference starts on September 12 and will be held
Registration is now open for CppCon 2026! The conference starts on September 12 and will be held 
Registration is now open for CppCon 2026! The conference starts on September 12 and will be held