From: Iain Buclaw Date: Wed, 3 Jun 2020 09:51:12 +0000 (+0200) Subject: d: Increment gaggedWarnings if warning or deprecation message was suppressed X-Git-Tag: basepoints/gcc-12~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4993d0265ef8ff1a75dfb86cd6da95ccc7fa6328;p=thirdparty%2Fgcc.git d: Increment gaggedWarnings if warning or deprecation message was suppressed gcc/d/ChangeLog: * d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning message was suppressed. (vdeprecation): Likewise for deprecation messages. --- diff --git a/gcc/d/d-diagnostic.cc b/gcc/d/d-diagnostic.cc index 659fae24459e..3bf5a535eddd 100644 --- a/gcc/d/d-diagnostic.cc +++ b/gcc/d/d-diagnostic.cc @@ -239,6 +239,8 @@ vwarning (const Loc &loc, const char *format, va_list ap) d_diagnostic_report_diagnostic (loc, 0, format, ap, DK_WARNING, false); } + else if (global.gag) + global.gaggedWarnings++; } /* Print supplementary message about the last warning with explicit location @@ -297,6 +299,8 @@ vdeprecation (const Loc &loc, const char *format, va_list ap, DK_WARNING, false); free (xformat); } + else if (global.gag) + global.gaggedWarnings++; } /* Print supplementary message about the last deprecation with explicit