https://gcc.gnu.org/g:446f415e44fc0d5f4caeb182ecabf73329d5b049

commit r15-3295-g446f415e44fc0d5f4caeb182ecabf73329d5b049
Author: Viljar Indus <in...@adacore.com>
Date:   Fri Jun 21 13:19:10 2024 +0300

    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.

Diff:
---
 gcc/ada/freeze.adb   | 8 ++++----
 gcc/ada/sem_util.adb | 2 +-
 gcc/ada/sem_warn.adb | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index f8e8cf38bb6a..f7fc895055a1 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 b423f87d969f..ac64b1ca5496 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 ca385154cb43..49e9d90b478f 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;

Reply via email to