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

--- Comment #21 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #20)
> (In reply to Kamil Dudka from comment #19)
[...snip...]

> > Is there a better way to tell gcc to write all diagnostic messages only to
> > the specified SARIF file while keeping messages about unsupported flags,
> > non-existing input files and the like still printed to stderr?
> 
> How about another option
>   -fdiagnostics-set-output=
> that would work like 
>   -fdiagnostics-add-output=
> but rather than appending to the list of outputs, simply replaces anything
> in the existing list?

Now I think about it, that's only going to help for diagnostics that happen
before the -fdiagnostics-{add,set}-output= param is processed.  

FWIW SARIF has a distinction between a "result" and a "notification" where the
former refer to the software under test, and the latter to the testing (e.g. a
"tool configuration notification" could be "I can't read the config file to
start this run").  Currently GCC doesn't make such a distinction; perhaps it
should.

Reply via email to