From: Elisa Barboni Date: Wed, 26 Sep 2018 09:20:10 +0000 (+0000) Subject: [Ada] SPARK: minor error message enhancement X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1899cb68445dfc4726b17f3db81df0f2a41cb916;p=gcc.git [Ada] SPARK: minor error message enhancement 2018-09-26 Elisa Barboni gcc/ada/ * sem_prag.adb (Check_Refined_Global_Item): Improve error message. From-SVN: r264637 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 38354ec10f2..a45e0b8bc4d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-09-26 Elisa Barboni + + * sem_prag.adb (Check_Refined_Global_Item): Improve error + message. + 2018-09-26 Thomas Quinot * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index bc914119afa..7a71f533a43 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -27730,7 +27730,10 @@ package body Sem_Prag is -- it must be an extra (SPARK RM 7.2.4(3)). else - SPARK_Msg_NE ("extra global item &", Item, Item_Id); + pragma Assert (Present (Global)); + Error_Msg_Sloc := Sloc (Global); + SPARK_Msg_NE ("extra global item & does not refine or " & + "repeat any global item #", Item, Item_Id); end if; end if; end Check_Refined_Global_Item;