]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Add elaboration switch tags to info messages
authorViljar Indus <indus@adacore.com>
Tue, 2 Apr 2024 11:32:04 +0000 (14:32 +0300)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:26:48 +0000 (09:26 +0200)
Add the ?$? insertion characters for elaboration
message so they would be marked with the [-gnatel]
tag. Note that these insertion characters were
not added for SPARK elaboration messages:

gcc/ada/

* sem_elab.adb: Add missing elaboration insertion
characters to info messages.

gcc/ada/sem_elab.adb

index 9205f4cef82b68f52596abeb18e4dd8eb190c24b..4d6e14cc49c8d9f9babd29185fe2001cbef160f2 100644 (file)
@@ -4920,7 +4920,7 @@ package body Sem_Elab is
            and then not New_In_State.Suppress_Info_Messages
          then
             Error_Msg_NE
-              ("info: access to & during elaboration", Attr, Subp_Id);
+              ("info: access to & during elaboration?$?", Attr, Subp_Id);
          end if;
 
          --  Warnings are suppressed when a prior scenario is already in that
@@ -5027,7 +5027,7 @@ package body Sem_Elab is
            and then not New_In_State.Suppress_Info_Messages
          then
             Error_Msg_NE
-              ("info: activation of & during elaboration", Call, Obj_Id);
+              ("info: activation of & during elaboration?$?", Call, Obj_Id);
          end if;
 
          --  Nothing to do when the call activates a task whose type is defined
@@ -6461,7 +6461,7 @@ package body Sem_Elab is
             if In_SPARK then
                return " in SPARK";
             else
-               return "";
+               return "?$?";
             end if;
          end Suffix;
 
@@ -8277,7 +8277,9 @@ package body Sem_Elab is
                Error_Msg_Name_1     := Prag_Nam;
                Error_Msg_Qual_Level := Nat'Last;
 
-               Error_Msg_NE ("info: missing pragma % for unit &", N, Unit_Id);
+               Error_Msg_NE
+                 ("info: missing pragma % for unit &?$?", N,
+                  Unit_Id);
                Error_Msg_Qual_Level := 0;
             end if;
          end Info_Missing_Pragma;
@@ -8406,7 +8408,8 @@ package body Sem_Elab is
                Error_Msg_Qual_Level := Nat'Last;
 
                Error_Msg_NE
-                 ("info: implicit pragma % generated for unit &", N, Unit_Id);
+                 ("info: implicit pragma % generated for unit &?$?",
+                   N, Unit_Id);
 
                Error_Msg_Qual_Level := 0;
                Output_Active_Scenarios (N, In_State);