Bug 112425 - Invalid SARIF output when column number is zero
Summary: Invalid SARIF output when column number is zero
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: David Malcolm
URL:
Keywords: diagnostic, SARIF
Depends on:
Blocks:
 
Reported: 2023-11-07 14:46 UTC by David Malcolm
Modified: 2024-06-21 16:04 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.