summaryrefslogtreecommitdiff
path: root/gcc/ada/erroutc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:19:40 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:19:40 +0000
commitc2052d920b49395f766c1a47448d02f8896296e2 (patch)
tree2c708600f1cac4ba92be2eb201eabd01f089e8cf /gcc/ada/erroutc.adb
parentfa7571cb7857050d2dbd9e1657baa6385b5f5475 (diff)
downloadgcc-c2052d920b49395f766c1a47448d02f8896296e2.tar.gz
2007-04-20 Vincent Celier <celier@adacore.com>
Robert Dewar <dewar@adacore.com> * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb, butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads, err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads, fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads, lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads, makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb, par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb, prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads, prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb, sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb, uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb, ali.ads, ali.adb: Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to package Namet. Make File_Name_Type and Unit_Name_Type types derived from Mame_Id. Add new type Path_Name_Type, also derived from Name_Id. Use variables of types File_Name_Type and Unit_Name_Type in error messages. (Get_Name): Add parameter Ignore_Special, and set it reading file name (New_Copy): When debugging the compiler, call New_Node_Debugging_Output here. Define flags Flag217-Flag230 with associated subprograms (Flag_Word5): New record type. (Flag_Word5_Ptr): New access type. (To_Flag_Word5): New unchecked conversion. (To_Flag_Word5_Ptr): Likewise. (Flag216): New function. (Set_Flag216): New procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125377 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/erroutc.adb')
-rw-r--r--gcc/ada/erroutc.adb57
1 files changed, 46 insertions, 11 deletions
diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb
index cb508f22c75..9c2a614f78d 100644
--- a/gcc/ada/erroutc.adb
+++ b/gcc/ada/erroutc.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-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- --
@@ -673,32 +673,32 @@ package body Erroutc is
procedure Set_Msg_Insertion_File_Name is
begin
- if Error_Msg_Name_1 = No_Name then
+ if Error_Msg_File_1 = No_File then
null;
- elsif Error_Msg_Name_1 = Error_Name then
+ elsif Error_Msg_File_1 = Error_File_Name then
Set_Msg_Blank;
Set_Msg_Str ("<error>");
else
Set_Msg_Blank;
- Get_Name_String (Error_Msg_Name_1);
+ Get_Name_String (Error_Msg_File_1);
Set_Msg_Quote;
Set_Msg_Name_Buffer;
Set_Msg_Quote;
end if;
- -- The following assignments ensure that the second and third percent
- -- insertion characters will correspond to the Error_Msg_Name_2 and
- -- Error_Msg_Name_3 as required. We suppress possible validity checks in
- -- case operating in -gnatVa mode, and Error_Msg_Name_2/3 is not needed
- -- and has not been set.
+ -- The following assignments ensure that the second and third {
+ -- insertion characters will correspond to the Error_Msg_File_2 and
+ -- Error_Msg_File_3 values and We suppress possible validity checks in
+ -- case operating in -gnatVa mode, and Error_Msg_File_2 or
+ -- Error_Msg_File_3 is not needed and has not been set.
declare
pragma Suppress (Range_Check);
begin
- Error_Msg_Name_1 := Error_Msg_Name_2;
- Error_Msg_Name_2 := Error_Msg_Name_3;
+ Error_Msg_File_1 := Error_Msg_File_2;
+ Error_Msg_File_2 := Error_Msg_File_3;
end;
end Set_Msg_Insertion_File_Name;
@@ -857,6 +857,41 @@ package body Erroutc is
end;
end Set_Msg_Insertion_Name;
+ ------------------------------------
+ -- Set_Msg_Insertion_Name_Literal --
+ ------------------------------------
+
+ procedure Set_Msg_Insertion_Name_Literal is
+ begin
+ if Error_Msg_Name_1 = No_Name then
+ null;
+
+ elsif Error_Msg_Name_1 = Error_Name then
+ Set_Msg_Blank;
+ Set_Msg_Str ("<error>");
+
+ else
+ Set_Msg_Blank;
+ Get_Name_String (Error_Msg_Name_1);
+ Set_Msg_Quote;
+ Set_Msg_Name_Buffer;
+ Set_Msg_Quote;
+ end if;
+
+ -- The following assignments ensure that the second and third % or %%
+ -- insertion characters will correspond to the Error_Msg_Name_2 and
+ -- Error_Msg_Name_3 values and We suppress possible validity checks in
+ -- case operating in -gnatVa mode, and Error_Msg_Name_2 or
+ -- Error_Msg_Name_3 is not needed and has not been set.
+
+ declare
+ pragma Suppress (Range_Check);
+ begin
+ Error_Msg_Name_1 := Error_Msg_Name_2;
+ Error_Msg_Name_2 := Error_Msg_Name_3;
+ end;
+ end Set_Msg_Insertion_Name_Literal;
+
-------------------------------------
-- Set_Msg_Insertion_Reserved_Name --
-------------------------------------