Next year’s GCC 16 compiler release is continuing the trend of enhancing the compiler diagnostics support, including new features like optionally outputting compiler error/warning diagnostics to HTML format for better analysis.
David Malcolm of Red Hat who has consistently delivered many of the diagnostic improvements to the GNU Compiler Collection (GCC) presented on the enhancements coming for GCC 16. Malcolm was presenting at the GNU Tools Cauldron 2025 in Porto, Portugal.
This next annual GCC feature release is continuing to refine C++ diagnostics, there is experimental HTML output support, ongoing enhancements to -fanalyzer functionality, libdigagnostics improvements, and more.
GCC 16 is getting rid of its JSON output support for diagnostics in favor of SARIF while HTML output support is being added. For now this HTML output support can be enabled with GCC 16 using -fdiagnostics-add-output=experimental-html. An example HTML output for those intrigued by the support can see this example page by David Malcolm. There is ongoing work to enhance the visuals and make it easier to utilize. For some areas the HTML-based diagnostics can be a big win for easier analysis than only text-based representation from the terminal or log files.
GCC 16 is also set to deliver better C++ support for the -fanalyzer option, more useful SARIF output for diagnostics, and libdiagnostics better handles logical locations and other features. Not yet merged but there is also experimental IDE integration being worked on for GCC diagnostics using JSON-RPC.
Those interested in the diagnostics work being done for next year’s GCC 16 compiler release can learn more via the presentation assets from GNU Tools Cauldron 2025.