bcheck.adb, [...]: Move Name_Id, File_Name_Type and Unit_Name_Type from package Types...
[gcc.git] / gcc / ada / errutil.adb
index 25e18c1f0325e2ff29f1b4fb383e66d699c92317..f877fafe228d28a109a5b94df5fc40a371e4b8e7 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1991-2006, Free Software Foundation, Inc.         --
+--          Copyright (C) 1991-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -681,7 +681,12 @@ package body Errutil is
          --  Check for insertion character
 
          if C = '%' then
-            Set_Msg_Insertion_Name;
+            if P <= Text'Last and then Text (P) = '%' then
+               P := P + 1;
+               Set_Msg_Insertion_Name_Literal;
+            else
+               Set_Msg_Insertion_Name;
+            end if;
 
          elsif C = '$' then