From 446f415e44fc0d5f4caeb182ecabf73329d5b049 Mon Sep 17 00:00:00 2001 From: Viljar Indus Date: Fri, 21 Jun 2024 13:19:10 +0300 Subject: ada: Use consistent type continuations messages Avoid cases where the main message is an error and the continuation is a warning. gcc/ada/ * freeze.adb: Remove warning insertion characters from a continuation message. * sem_util.adb: Remove warning insertion characters from a continuation message. * sem_warn.adb: Use same warning character as the main message. --- gcc/ada/freeze.adb | 8 ++++---- gcc/ada/sem_util.adb | 2 +- gcc/ada/sem_warn.adb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index f8e8cf3..f7fc895 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3287,7 +3287,7 @@ package body Freeze is ("aspect % applied to task type &", Typ); Error_Msg_N ("\replace task components with access-to-task-type " - & "components??", Typ); + & "components", Typ); end if; else @@ -7617,16 +7617,16 @@ package body Freeze is if Ada_Version >= Ada_2005 then Error_Msg_N - ("\would be legal if Storage_Size of 0 given??", E); + ("\would be legal if Storage_Size of 0 given", E); elsif No_Pool_Assigned (E) then Error_Msg_N - ("\would be legal in Ada 2005??", E); + ("\would be legal in Ada 2005", E); else Error_Msg_N ("\would be legal in Ada 2005 if " - & "Storage_Size of 0 given??", E); + & "Storage_Size of 0 given", E); end if; end if; end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b423f87..ac64b1c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -5938,7 +5938,7 @@ package body Sem_Util is else Error_Msg ("\Constraint_Error will be raised" - & " for objects of this type??", Eloc, N); + & " for objects of this type", Eloc, N); end if; end if; end; diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index ca38515..49e9d90 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -3511,15 +3511,15 @@ package body Sem_Warn is Error_Msg_Sloc := Sloc (CV); if Nkind (CV) not in N_Subexpr then - Error_Msg_N ("\\??(see test #)", N); + Error_Msg_N ("\\?c?(see test #)", N); elsif Nkind (Parent (CV)) = N_Case_Statement_Alternative then - Error_Msg_N ("\\??(see case alternative #)", N); + Error_Msg_N ("\\?c?(see case alternative #)", N); else - Error_Msg_N ("\\??(see assignment #)", N); + Error_Msg_N ("\\?c?(see assignment #)", N); end if; end if; end; -- cgit v1.1