]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Use consistent type continuations messages
authorViljar Indus <indus@adacore.com>
Fri, 21 Jun 2024 10:19:10 +0000 (13:19 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 29 Aug 2024 13:06:27 +0000 (15:06 +0200)
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
gcc/ada/sem_util.adb
gcc/ada/sem_warn.adb

index f8e8cf38bb6ad43e7d2135609b80436b3a168970..f7fc895055a1b7eda0b101f0654c18b658096232 100644 (file)
@@ -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;
index b423f87d969f745527b0854b7402cbe48aba1c1d..ac64b1ca549617f8a9abd4972675379474951a1a 100644 (file)
@@ -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;
index ca385154cb4398a1ae663ce41b52eb893a357e43..49e9d90b478f845936a30a23aa7063505ac7087c 100644 (file)
@@ -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;