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

--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Created attachment 58523
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58523&action=edit
WIP patch to try to print all notes for an error with -Wfatal-errors

Am attaching an experimental patch for this that keeps the compiler around on
-Wfatal-errors if there's an active diagnostic_group until after the
diagnostic_group ends, or a non-note follows.

Unfinished, as it would need:
- ChangeLog
- docs update
- test cases (for text, sarif and json output); possibly via a test plugin to
synthesize the case of a followup error within the same diagnostic_group

But the main thing is, are we comfortable not bailing out immediately on the
error in -Wfatal-errors?  There could be non-trivial work being done in the
scope of the auto_diagnostic_context.  Perhaps something to discuss on mailing
list.

Reply via email to