[multiple changes]
[gcc.git] / gcc / ada / sem_prag.adb
index 35410b8be3f035d4fa187650450ff153e70cd02d..3364b6eb7e886b4719eb29dcf05cbd56aa7f46d9 100644 (file)
@@ -980,7 +980,7 @@ package body Sem_Prag is
       procedure Check_Ada_83_Warning is
       begin
          if Ada_Version = Ada_83 and then Comes_From_Source (N) then
-            Error_Msg_N ("(Ada 83) pragma& is non-standard?", N);
+            Error_Msg_N ("(Ada 83) pragma& is non-standard??", N);
          end if;
       end Check_Ada_83_Warning;
 
@@ -1853,7 +1853,7 @@ package body Sem_Prag is
          then
             Error_Msg_Name_1 := Pname;
             Error_Msg_N
-              ("?pragma% is only effective in main program", N);
+              ("??pragma% is only effective in main program", N);
          end if;
       end Check_In_Main_Program;
 
@@ -3551,7 +3551,7 @@ package body Sem_Prag is
          else
             if Warn_On_Export_Import and not OpenVMS_On_Target then
                Error_Msg_N
-                 ("?unrecognized convention name, C assumed",
+                 ("??unrecognized convention name, C assumed",
                   Get_Pragma_Arg (Arg1));
             end if;
 
@@ -3860,7 +3860,7 @@ package body Sem_Prag is
       begin
          if not OpenVMS_On_Target then
             Error_Pragma
-              ("?pragma% ignored (applies only to Open'V'M'S)");
+              ("??pragma% ignored (applies only to Open'V'M'S)");
          end if;
 
          Process_Extended_Import_Export_Internal_Arg (Arg_Internal);
@@ -3996,7 +3996,7 @@ package body Sem_Prag is
             end if;
 
             if Warn_On_Export_Import and then Is_Exported (Def_Id) then
-               Error_Msg_N ("?duplicate Export_Object pragma", N);
+               Error_Msg_N ("??duplicate Export_Object pragma", N);
             else
                Set_Exported (Def_Id, Arg_Internal);
             end if;
@@ -4019,21 +4019,20 @@ package body Sem_Prag is
               and then Has_Discriminants (Etype (Def_Id))
             then
                Error_Msg_N
-                 ("imported value must be initialized?", Arg_Internal);
+                 ("imported value must be initialized??", Arg_Internal);
             end if;
 
             if Warn_On_Export_Import
               and then Is_Access_Type (Etype (Def_Id))
             then
                Error_Pragma_Arg
-                 ("cannot import object of an access type?", Arg_Internal);
+                 ("cannot import object of an access type??", Arg_Internal);
             end if;
 
             if Warn_On_Export_Import
               and then Is_Imported (Def_Id)
             then
-               Error_Msg_N
-                 ("?duplicate Import_Object pragma", N);
+               Error_Msg_N ("??duplicate Import_Object pragma", N);
 
             --  Check for explicit initialization present. Note that an
             --  initialization generated by the code generator, e.g. for an
@@ -4957,7 +4956,7 @@ package body Sem_Prag is
                if Front_End_Inlining
                  and then Analyzed (Corresponding_Body (Decl))
                then
-                  Error_Msg_N ("pragma appears too late, ignored?", N);
+                  Error_Msg_N ("pragma appears too late, ignored??", N);
                   return True;
 
                --  If the subprogram is a renaming as body, the body is just a
@@ -5209,10 +5208,12 @@ package body Sem_Prag is
             then
                if Inlining_Not_Possible (Subp) then
                   Error_Msg_NE
-                    ("pragma Inline for& is ignored?", N, Entity (Subp_Id));
+                    ("pragma Inline for& is ignored?r?",
+                     N, Entity (Subp_Id));
                else
                   Error_Msg_NE
-                    ("pragma Inline for& is redundant?", N, Entity (Subp_Id));
+                    ("pragma Inline for& is redundant?r?",
+                     N, Entity (Subp_Id));
                end if;
             end if;
 
@@ -5284,7 +5285,7 @@ package body Sem_Prag is
                                       Get_Character (C) = '/'))
                then
                   Error_Msg
-                    ("?interface name contains illegal character",
+                    ("??interface name contains illegal character",
                      Sloc (SN) + Source_Ptr (J));
                end if;
             end loop;
@@ -5704,7 +5705,7 @@ package body Sem_Prag is
 
                if not UI_Is_In_Int_Range (Val) then
                   Error_Pragma_Arg
-                    ("pragma ignored, value too large?", Arg);
+                    ("pragma ignored, value too large??", Arg);
                end if;
 
                --  Warning case. If the real restriction is active, then we
@@ -5981,20 +5982,23 @@ package body Sem_Prag is
                  and then Comes_From_Source (Arg)
                then
                   Error_Msg_NE
-                    ("?& has been made static as a result of Export", Arg, E);
+                    ("?x?& has been made static as a result of Export",
+                     Arg, E);
                   Error_Msg_N
-                    ("\this usage is non-standard and non-portable", Arg);
+                    ("\?x?this usage is non-standard and non-portable",
+                     Arg);
                end if;
             end if;
          end if;
 
          if Warn_On_Export_Import and then Is_Type (E) then
-            Error_Msg_NE ("exporting a type has no effect?", Arg, E);
+            Error_Msg_NE ("exporting a type has no effect?x?", Arg, E);
          end if;
 
          if Warn_On_Export_Import and Inside_A_Generic then
             Error_Msg_NE
-              ("all instances of& will have the same external name?", Arg, E);
+              ("all instances of& will have the same external name?x?",
+               Arg, E);
          end if;
       end Set_Exported;
 
@@ -6562,13 +6566,13 @@ package body Sem_Prag is
       if not Is_Pragma_Name (Pname) then
          if Warn_On_Unrecognized_Pragma then
             Error_Msg_Name_1 := Pname;
-            Error_Msg_N ("?unrecognized pragma%!", Pragma_Identifier (N));
+            Error_Msg_N ("?g?unrecognized pragma%!", Pragma_Identifier (N));
 
             for PN in First_Pragma_Name .. Last_Pragma_Name loop
                if Is_Bad_Spelling_Of (Pname, PN) then
                   Error_Msg_Name_1 := PN;
                   Error_Msg_N -- CODEFIX
-                    ("\?possible misspelling of %!", Pragma_Identifier (N));
+                    ("\?g?possible misspelling of %!", Pragma_Identifier (N));
                   exit;
                end if;
             end loop;
@@ -8119,7 +8123,7 @@ package body Sem_Prag is
                --  Following message is obsolete ???
                Error_Msg_N
                  ("'G'N'A'T pragma cpp'_class is now obsolete and has no " &
-                  "effect; replace it by pragma import?", N);
+                  "effect; replace it by pragma import?j?", N);
             end if;
 
             Check_Arg_Count (1);
@@ -8171,7 +8175,7 @@ package body Sem_Prag is
 
             if Is_Constructor (Def_Id) then
                Error_Msg_N
-                 ("?duplicate argument for pragma 'C'P'P_Constructor", Arg1);
+                 ("??duplicate argument for pragma 'C'P'P_Constructor", Arg1);
                return;
             end if;
 
@@ -8245,7 +8249,7 @@ package body Sem_Prag is
             if Warn_On_Obsolescent_Feature then
                Error_Msg_N
                  ("'G'N'A'T pragma cpp'_virtual is now obsolete and has " &
-                  "no effect?", N);
+                  "no effect?j?", N);
             end if;
          end CPP_Virtual;
 
@@ -8260,7 +8264,7 @@ package body Sem_Prag is
             if Warn_On_Obsolescent_Feature then
                Error_Msg_N
                  ("'G'N'A'T pragma cpp'_vtable is now obsolete and has " &
-                  "no effect?", N);
+                  "no effect?j?", N);
             end if;
          end CPP_Vtable;
 
@@ -8745,9 +8749,9 @@ package body Sem_Prag is
 
             if Elab_Warnings and not Dynamic_Elaboration_Checks then
                Error_Msg_N
-                 ("?use of pragma Elaborate may not be safe", N);
+                 ("?l?use of pragma Elaborate may not be safe", N);
                Error_Msg_N
-                 ("?use pragma Elaborate_All instead if possible", N);
+                 ("?l?use pragma Elaborate_All instead if possible", N);
             end if;
          end Elaborate;
 
@@ -9586,7 +9590,7 @@ package body Sem_Prag is
             if not OpenVMS_On_Target then
                if Chars (Get_Pragma_Arg (Arg1)) = Name_VAX_Float then
                   Error_Pragma
-                    ("?pragma% ignored (applies only to Open'V'M'S)");
+                    ("??pragma% ignored (applies only to Open'V'M'S)");
                end if;
 
                return;
@@ -11564,7 +11568,7 @@ package body Sem_Prag is
             Check_Arg_Is_One_Of (Arg1, Name_D_Float, Name_G_Float);
 
             if not OpenVMS_On_Target then
-               Error_Pragma ("?pragma% ignored (applies only to Open'V'M'S)");
+               Error_Pragma ("??pragma% ignored (applies only to Open'V'M'S)");
             end if;
 
             --  D_Float case
@@ -12468,7 +12472,7 @@ package body Sem_Prag is
                   elsif VM_Target /= No_VM then
                      if not GNAT_Mode then
                         Error_Pragma
-                          ("?pragma% ignored in this configuration");
+                          ("??pragma% ignored in this configuration");
                      end if;
 
                   --  Normal case where we do the pack action
@@ -12494,7 +12498,7 @@ package body Sem_Prag is
                   if VM_Target /= No_VM then
                      if not GNAT_Mode then
                         Error_Pragma
-                          ("?pragma% ignored in this configuration");
+                          ("??pragma% ignored in this configuration");
                      end if;
 
                   --  Normal case of pack request active
@@ -12639,7 +12643,7 @@ package body Sem_Prag is
             if Has_Pragma_Preelab_Init (Ent)
               and then Warn_On_Redundant_Constructs
             then
-               Error_Pragma ("?duplicate pragma%!");
+               Error_Pragma ("?r?duplicate pragma%!");
             else
                Set_Has_Pragma_Preelab_Init (Ent);
             end if;
@@ -13314,7 +13318,7 @@ package body Sem_Prag is
                  or else
                Has_Rep_Pragma (Def_Id, Name_Psect_Object)
             then
-               Error_Msg_N ("?duplicate Common/Psect_Object pragma", N);
+               Error_Msg_N ("??duplicate Common/Psect_Object pragma", N);
             end if;
 
             if Ekind (Def_Id) = E_Constant then
@@ -13338,7 +13342,7 @@ package body Sem_Prag is
                        and then Warn_On_Export_Import
                      then
                         Error_Msg_N
-                          ("?object for pragma % has defaults", Internal);
+                          ("?x?object for pragma % has defaults", Internal);
                         exit;
 
                      else
@@ -13522,7 +13526,7 @@ package body Sem_Prag is
                  and then Warn_On_Redundant_Constructs
                then
                   Error_Msg_NE
-                    ("pragma Pure_Function on& is redundant?",
+                    ("pragma Pure_Function on& is redundant?r?",
                      N, Entity (E_Id));
                end if;
             end if;
@@ -13728,8 +13732,10 @@ package body Sem_Prag is
             Set_Ravenscar_Profile (N);
 
             if Warn_On_Obsolescent_Feature then
-               Error_Msg_N ("pragma Ravenscar is an obsolescent feature?", N);
-               Error_Msg_N ("|use pragma Profile (Ravenscar) instead", N);
+               Error_Msg_N
+                 ("pragma Ravenscar is an obsolescent feature?j?", N);
+               Error_Msg_N
+                 ("|use pragma Profile (Ravenscar) instead?j?", N);
             end if;
 
          -------------------------
@@ -13747,8 +13753,10 @@ package body Sem_Prag is
 
             if Warn_On_Obsolescent_Feature then
                Error_Msg_N
-                 ("pragma Restricted_Run_Time is an obsolescent feature?", N);
-               Error_Msg_N ("|use pragma Profile (Restricted) instead", N);
+                 ("pragma Restricted_Run_Time is an obsolescent feature?j?",
+                  N);
+               Error_Msg_N
+                 ("|use pragma Profile (Restricted) instead?j?", N);
             end if;
 
          ------------------
@@ -14939,7 +14947,7 @@ package body Sem_Prag is
             end if;
 
             if not AAMP_On_Target then
-               Error_Pragma ("?pragma% ignored (applies only to AAMP)");
+               Error_Pragma ("??pragma% ignored (applies only to AAMP)");
             end if;
 
          ----------------
@@ -15432,7 +15440,7 @@ package body Sem_Prag is
 
                            if Err then
                               Error_Msg
-                                ("?pragma Warnings On with no " &
+                                ("??pragma Warnings On with no " &
                                  "matching Warnings Off",
                                  Loc);
                            end if;