[Bug middle-end/107941] json diagnostics format does not include header stack info

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 1 15:49:27 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107941

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> Does the SARIF output format contain the information you need?

No it does not:
{"$schema":
"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"runs": [{"results": [{"level": "error", "ruleId": "error", "locations":
[{"physicalLocation": {"contextRegion": {"startLine": 1, "snippet": {"text":
"int asdfg dsfg;\n"}}, "artifactLocation": {"uri": "t.h", "uriBaseId": "PWD"},
"region": {"startLine": 1, "endColumn": 15, "startColumn": 11}}}], "message":
{"text": "expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dsfg’"}}],
"artifacts": [{"location": {"uri": "t.h", "uriBaseId": "PWD"},
"sourceLanguage": "c", "contents": {"text": "int asdfg dsfg;\n"}}], "tool":
{"driver": {"fullName": "GNU C17 (GCC) version 13.0.0 20221130 (experimental)
[master c382832afd5] (x86_64-pc-linux-gnu)", "name": "GNU C17", "rules": [],
"informationUri": "https://gcc.gnu.org/gcc-13/", "version": "13.0.0 20221130
(experimental) [master c382832afd5]"}}, "originalUriBaseIds": {"PWD": {"uri":
"file:///home/apinski/src/upstream-gcc/"}}}], "version": "2.1.0"}


More information about the Gcc-bugs mailing list