Bug 112425

Summary: Invalid SARIF output when column number is zero
Product: gcc Reporter: David Malcolm <dmalcolm>
Component: otherAssignee: David Malcolm <dmalcolm>
Status: RESOLVED FIXED    
Severity: normal Keywords: diagnostic, SARIF
Priority: P3    
Version: unknown   
Target Milestone: ---   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109360
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description David Malcolm 2023-11-07 14:46:41 UTC
We use column number == 0 to mean "the whole line".

As noted in:
  https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635446.html
SARIF requires column numbers to be >= 1

We should simply omit the attribute for such cases.
Comment 1 David Malcolm 2024-06-21 15:53:00 UTC
Should be fixed by commit r15-1540-g9f4fdc3acebcf6b045edea1361570658da4bc0ab.