aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/binde.adb
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2007-06-06 12:19:40 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-06-06 12:19:40 +0200
commit39f4e199a51bc4ff869d273937d363902cc963c3 (patch)
tree2c708600f1cac4ba92be2eb201eabd01f089e8cf /gcc/ada/binde.adb
parent379ec90449ee88ae149c19e377910f453007e137 (diff)
downloadgcc-39f4e199a51bc4ff869d273937d363902cc963c3.zip
gcc-39f4e199a51bc4ff869d273937d363902cc963c3.tar.gz
gcc-39f4e199a51bc4ff869d273937d363902cc963c3.tar.bz2
bcheck.adb, [...]: Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to package Namet.
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. From-SVN: r125377
Diffstat (limited to 'gcc/ada/binde.adb')
-rw-r--r--gcc/ada/binde.adb70
1 files changed, 38 insertions, 32 deletions
diff --git a/gcc/ada/binde.adb b/gcc/ada/binde.adb
index 5bfccbf..7479e51 100644
--- a/gcc/ada/binde.adb
+++ b/gcc/ada/binde.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- --
@@ -266,7 +266,7 @@ package body Binde is
procedure Elab_Error_Msg (S : Successor_Id);
-- Given a successor link, outputs an error message of the form
- -- "& must be elaborated before & ..." where ... is the reason.
+ -- "$ must be elaborated before $ ..." where ... is the reason.
procedure Gather_Dependencies;
-- Compute dependencies, building the Succ and UNR tables
@@ -911,17 +911,17 @@ package body Binde is
-- Here we want to generate output
- Error_Msg_Name_1 := Units.Table (SL.Before).Uname;
+ Error_Msg_Unit_1 := Units.Table (SL.Before).Uname;
if SL.Elab_Body then
- Error_Msg_Name_2 := Units.Table (Corresponding_Body (SL.After)).Uname;
+ Error_Msg_Unit_2 := Units.Table (Corresponding_Body (SL.After)).Uname;
else
- Error_Msg_Name_2 := Units.Table (SL.After).Uname;
+ Error_Msg_Unit_2 := Units.Table (SL.After).Uname;
end if;
- Error_Msg_Output (" & must be elaborated before &", Info => True);
+ Error_Msg_Output (" $ must be elaborated before $", Info => True);
- Error_Msg_Name_1 := Units.Table (SL.Reason_Unit).Uname;
+ Error_Msg_Unit_1 := Units.Table (SL.Reason_Unit).Uname;
case SL.Reason is
when Withed =>
@@ -931,30 +931,30 @@ package body Binde is
when Elab =>
Error_Msg_Output
- (" reason: pragma Elaborate in unit &",
+ (" reason: pragma Elaborate in unit $",
Info => True);
when Elab_All =>
Error_Msg_Output
- (" reason: pragma Elaborate_All in unit &",
+ (" reason: pragma Elaborate_All in unit $",
Info => True);
when Elab_All_Desirable =>
Error_Msg_Output
- (" reason: implicit Elaborate_All in unit &",
+ (" reason: implicit Elaborate_All in unit $",
Info => True);
Error_Msg_Output
- (" recompile & with -gnatwl for full details",
+ (" recompile $ with -gnatwl for full details",
Info => True);
when Elab_Desirable =>
Error_Msg_Output
- (" reason: implicit Elaborate in unit &",
+ (" reason: implicit Elaborate in unit $",
Info => True);
Error_Msg_Output
- (" recompile & with -gnatwl for full details",
+ (" recompile $ with -gnatwl for full details",
Info => True);
when Spec_First =>
@@ -966,19 +966,21 @@ package body Binde is
Write_Elab_All_Chain (S);
if SL.Elab_Body then
- Error_Msg_Name_1 := Units.Table (SL.Before).Uname;
- Error_Msg_Name_2 := Units.Table (SL.After).Uname;
+ Error_Msg_Unit_1 := Units.Table (SL.Before).Uname;
+ Error_Msg_Unit_2 := Units.Table (SL.After).Uname;
Error_Msg_Output
- (" & must therefore be elaborated before &",
+ (" $ must therefore be elaborated before $",
True);
- Error_Msg_Name_1 := Units.Table (SL.After).Uname;
+ Error_Msg_Unit_1 := Units.Table (SL.After).Uname;
Error_Msg_Output
- (" (because & has a pragma Elaborate_Body)",
+ (" (because $ has a pragma Elaborate_Body)",
True);
end if;
- Write_Eol;
+ if not Zero_Formatting then
+ Write_Eol;
+ end if;
end Elab_Error_Msg;
---------------------
@@ -1155,9 +1157,9 @@ package body Binde is
-- obsolete unit with's a previous (now disappeared) spec.
if Get_Name_Table_Info (Withs.Table (W).Uname) = 0 then
- Error_Msg_Name_1 := Units.Table (U).Sfile;
- Error_Msg_Name_2 := Withs.Table (W).Uname;
- Error_Msg ("% depends on & which no longer exists");
+ Error_Msg_File_1 := Units.Table (U).Sfile;
+ Error_Msg_Unit_1 := Withs.Table (W).Uname;
+ Error_Msg ("{ depends on $ which no longer exists");
goto Next_With;
end if;
@@ -1403,11 +1405,12 @@ package body Binde is
procedure Write_Dependencies is
begin
- Write_Eol;
- Write_Str
- (" ELABORATION ORDER DEPENDENCIES");
- Write_Eol;
- Write_Eol;
+ if not Zero_Formatting then
+ Write_Eol;
+ Write_Str (" ELABORATION ORDER DEPENDENCIES");
+ Write_Eol;
+ Write_Eol;
+ end if;
Info_Prefix_Suppress := True;
@@ -1416,7 +1419,10 @@ package body Binde is
end loop;
Info_Prefix_Suppress := False;
- Write_Eol;
+
+ if not Zero_Formatting then
+ Write_Eol;
+ end if;
end Write_Dependencies;
--------------------------
@@ -1437,8 +1443,8 @@ package body Binde is
L := ST.Elab_All_Link;
while L /= No_Elab_All_Link loop
Nam := Elab_All_Entries.Table (L).Needed_By;
- Error_Msg_Name_1 := Nam;
- Error_Msg_Output (" &", Info => True);
+ Error_Msg_Unit_1 := Nam;
+ Error_Msg_Output (" $", Info => True);
Get_Name_String (Nam);
@@ -1473,8 +1479,8 @@ package body Binde is
L := Elab_All_Entries.Table (L).Next_Elab;
end loop;
- Error_Msg_Name_1 := After;
- Error_Msg_Output (" &", Info => True);
+ Error_Msg_Unit_1 := After;
+ Error_Msg_Output (" $", Info => True);
end if;
end Write_Elab_All_Chain;