[Ada] Fix inconsistent parameter of SPARK_Msg_NE
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 9 Oct 2020 12:27:08 +0000 (14:27 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:16:07 +0000 (05:16 -0500)
gcc/ada/

* sem_prag.adb (Analyze_Global_Item): Call SPARK_Msg_NE with the
entity, not with its identifier.

gcc/ada/sem_prag.adb

index a46f52f083857ad969666cd26aa996ff2a0e9a59..2ccaaa2e97a9f02d697ad9fb6f359bbe5fcd1f0f 100644 (file)
@@ -2385,7 +2385,7 @@ package body Sem_Prag is
 
                   if Ekind (Item_Id) in Named_Kind then
                      SPARK_Msg_NE
-                       ("\named number & is not an object", Item, Item);
+                       ("\named number & is not an object", Item, Item_Id);
                   end if;
 
                   return;