]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Increment gaggedWarnings if warning or deprecation message was suppressed
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 3 Jun 2020 09:51:12 +0000 (11:51 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 6 Apr 2021 17:43:31 +0000 (19:43 +0200)
gcc/d/ChangeLog:

* d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning
message was suppressed.
(vdeprecation): Likewise for deprecation messages.

gcc/d/d-diagnostic.cc

index 659fae24459eb9755809e319971b998f4653a40a..3bf5a535eddd5d8d1a68fe0e724bc6496413197e 100644 (file)
@@ -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