]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Don't check for misspelling of Not_A_Restriction_Id
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 24 Jun 2022 07:07:51 +0000 (09:07 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 12 Jul 2022 12:24:14 +0000 (12:24 +0000)
When looking for a misspelling of a restriction identifier we should
ignore the Not_A_Restriction_Id literal, because it doesn't represent
any restriction.

gcc/ada/

* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Fix range of iteration.

gcc/ada/sem_prag.adb

index 35910400cf9afeaacafee30e85ed40e9c4680b7d..982fdf811c64fd08c42cf85e60a031cbf69c3d35 100644 (file)
@@ -10561,7 +10561,7 @@ package body Sem_Prag is
 
                   --  Check for possible misspelling
 
-                  for J in Restriction_Id loop
+                  for J in All_Restrictions loop
                      declare
                         Rnm : constant String := Restriction_Id'Image (J);