On 7/6/20 8:21 PM, Martin Sebor wrote:
The code for -Wmismatched-tags tests warn_mismatched_tags and when
it's non-zero assumes that calls to warning_at() necessarily succeed,
proceeding to call inform() to unconditionally issue informational
notes.  This assumption is wrong when -Wmismatched-tags is enabled
(and warn_mismatched_tags is nonzero) but the instance of the warning
is for code in a system header and -Wsystem-headers is disabled.  In
that case, the warning is suppressed but the notes are still printed.
The attached near-trivial change makes the calls to inform() conditional
on the result from warning_at().

OK.

Reply via email to