[gcc r11-5309] [Ada] Fix inconsistent parameter of SPARK_Msg_NE

Pierre-Marie de Rodat pmderodat@gcc.gnu.org
Tue Nov 24 10:19:25 GMT 2020


https://gcc.gnu.org/g:607695354a57bce732b027828614bceda0e393eb

commit r11-5309-g607695354a57bce732b027828614bceda0e393eb
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Fri Oct 9 14:27:08 2020 +0200

    [Ada] Fix inconsistent parameter of SPARK_Msg_NE
    
    gcc/ada/
    
            * sem_prag.adb (Analyze_Global_Item): Call SPARK_Msg_NE with the
            entity, not with its identifier.

Diff:
---
 gcc/ada/sem_prag.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index a46f52f0838..2ccaaa2e97a 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -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;


More information about the Gcc-cvs mailing list