[Ada] Fix calls to Error_Msg_NE instead of Error_Msg_N
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 23 Dec 2020 17:57:18 +0000 (18:57 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 3 May 2021 09:28:23 +0000 (05:28 -0400)
gcc/ada/

* freeze.adb (Freeze_Profile): Replace Error_Msg_NE with
Error_Msg_N; change to continuation message.
* sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch5.adb: Replace
calls to Error_Msg_NE with calls to Error_Msg_N.

gcc/ada/freeze.adb
gcc/ada/sem_cat.adb
gcc/ada/sem_ch10.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch5.adb

index bf20cbcef44888e352ab4e93461c3c11c8d50b0b..675cde36b33eb710952d1282c680a1843862932e 100644 (file)
@@ -3749,8 +3749,8 @@ package body Freeze is
 
                Error_Msg_NE ("?x?type of argument& is unconstrained array",
                   Warn_Node, Formal);
-               Error_Msg_NE ("?x?foreign caller must pass bounds explicitly",
-                  Warn_Node, Formal);
+               Error_Msg_N ("\?x?foreign caller must pass bounds explicitly",
+                  Warn_Node);
                Error_Msg_Qual_Level := 0;
             end if;
 
index ea02ecd634e16b42294e4cb6c047a023561c8052..fe5d9e572286ad35bd9cf2860ed01f4fd9df5299 100644 (file)
@@ -296,18 +296,16 @@ package body Sem_Cat is
          --  Add further explanation for Pure/Preelaborate common cases
 
          if Unit_Category = Pure then
-            Error_Msg_NE
-              ("\<<pure unit cannot depend on non-pure unit",
-               N, Depended_Entity);
+            Error_Msg_N
+              ("\<<pure unit cannot depend on non-pure unit", N);
 
          elsif Is_Preelaborated (Unit_Entity)
            and then not Is_Preelaborated (Depended_Entity)
            and then not Is_Pure (Depended_Entity)
          then
-            Error_Msg_NE
+            Error_Msg_N
               ("\<<preelaborated unit cannot depend on "
-               & "non-preelaborated unit",
-               N, Depended_Entity);
+               & "non-preelaborated unit", N);
          end if;
       end if;
    end Check_Categorization_Dependencies;
index 807da29a16b1050ee4a6c6d129addeb34fa72816..3b5a98045ab77b46860206daad1ee49e979c36c2 100644 (file)
@@ -1561,9 +1561,9 @@ package body Sem_Ch10 is
                                  Error_Msg_N
                                    ("simultaneous visibility of limited and "
                                     & "unlimited views not allowed", Item);
-                                 Error_Msg_NE
+                                 Error_Msg_N
                                    ("\unlimited view visible through context "
-                                    & "clause #", Item, It);
+                                    & "clause #", Item);
                                  exit;
 
                               elsif Nkind (Unit_Name) = N_Identifier then
index eacd63ca00da50e4d10975dc08502ed7a2b5056a..6279455890dc896aef4158da7f124b21df7828f8 100644 (file)
@@ -13828,9 +13828,9 @@ package body Sem_Ch12 is
                Actual_Discr := First_Discriminant (Act_T);
                while Formal_Discr /= Empty loop
                   if Actual_Discr = Empty then
-                     Error_Msg_NE
+                     Error_Msg_N
                        ("discriminants on actual do not match formal",
-                        Actual, Gen_T);
+                        Actual);
                      Abandon_Instantiation (Actual);
                   end if;
 
@@ -13851,18 +13851,18 @@ package body Sem_Ch12 is
                   elsif Base_Type (Formal_Subt) /=
                           Base_Type (Etype (Actual_Discr))
                   then
-                     Error_Msg_NE
+                     Error_Msg_N
                        ("types of actual discriminants must match formal",
-                        Actual, Gen_T);
+                        Actual);
                      Abandon_Instantiation (Actual);
 
                   elsif not Subtypes_Statically_Match
                               (Formal_Subt, Etype (Actual_Discr))
                     and then Ada_Version >= Ada_95
                   then
-                     Error_Msg_NE
+                     Error_Msg_N
                        ("subtypes of actual discriminants must match formal",
-                        Actual, Gen_T);
+                        Actual);
                      Abandon_Instantiation (Actual);
                   end if;
 
index 1877bd84764469b08e18a257c48e1d5a1a4dd1fb..61af51ec81dfe7fa7c355cffaff323ceadfa6b20 100644 (file)
@@ -2037,8 +2037,8 @@ package body Sem_Ch5 is
             then
                null;
             else
-               Error_Msg_NE
-                 ("container type does not support reverse iteration", N, Typ);
+               Error_Msg_N
+                 ("container type does not support reverse iteration", N);
             end if;
          end if;
       end Check_Reverse_Iteration;