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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-03-18

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for reporting this.

Note that -fanalyzer isn't needed to reproduce this problem, e.g. on trunk
with:

$ (./xgcc -B. -fdiagnostics-format=sarif-stderr -c test.c 2>&1) | python -m
json.tool
Extra data: line 24 column 1 (char 1839)

Also affects -fdiagnostics-format=json-stderr.

fnotice (stderr, ...) is used in ~150 places in trunk.

I'm looking at ways of fixing this (perhaps by having fnotice bail out early on
these machine-readable stderr formats when outputting to stderr).

Reply via email to