From 1899cb68445dfc4726b17f3db81df0f2a41cb916 Mon Sep 17 00:00:00 2001 From: Elisa Barboni Date: Wed, 26 Sep 2018 09:20:10 +0000 Subject: [PATCH] [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 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/sem_prag.adb | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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; -- 2.30.2