]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix deleted Compile_Time warnings causing crashes
authorGhjuvan Lacambre <lacambre@adacore.com>
Mon, 18 Oct 2021 13:34:42 +0000 (15:34 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 25 Oct 2021 15:07:19 +0000 (15:07 +0000)
gcc/ada/

* erroutc.adb (Count_Compile_Time_Pragma_Warnings): Don't count
deleted warnings.

gcc/ada/erroutc.adb

index 9e67b929cb7703fd158993a7b479a402d8455c87..8d362de665734ea7564a2e53463290c75060ee7f 100644 (file)
@@ -277,7 +277,9 @@ package body Erroutc is
    begin
       for J in 1 .. Errors.Last loop
          begin
-            if Errors.Table (J).Warn and Errors.Table (J).Compile_Time_Pragma
+            if Errors.Table (J).Warn
+               and then Errors.Table (J).Compile_Time_Pragma
+               and then not Errors.Table (J).Deleted
             then
                Result := Result + 1;
             end if;