FRIDAY, NOVEMBER 13, 2026
diagnostics
Diagnostics gain new markup representation
A new tree-like markup representation for diagnostic messages is introduced to better support analyzer changes.
A new tree-like representation for diagnostic messages has been added to GCC’s diagnostics infrastructure. This initial version is simple and primarily serves upcoming changes in the analyzer. Future work aims to enrich this markup to support richer output formats like HTML and Markdown in SARIF.
In Details
GCC's diagnostics system gains a new diagnostics::markup class, implemented in diagnostics/markup.cc/.h. This is a tree-based structure for representing diagnostic message components, intended to facilitate upcoming improvements to the analyzer's diagnostic reporting, particularly for complex cases and richer output formats.
For Context
- GCC analyzer
- A static analysis component within GCC that inspects code without executing it, aiming to find bugs and provide information about program behavior.
- SARIF
- Static Analysis Results Interchange Format, a standard JSON-based format for the output of static analysis tools.
- tree-like representation
- A data structure organized hierarchically, where elements are nodes connected by edges, resembling a tree.