diff mbox series

[Ada] Don't check for misspelling of Not_A_Restriction_Id

Message ID 20220712122533.GA3404936@adacore.com
State New
Headers show
Series [Ada] Don't check for misspelling of Not_A_Restriction_Id | expand

Commit Message

Pierre-Marie de Rodat July 12, 2022, 12:25 p.m. UTC
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.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

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

Patch

diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -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);