diff options
author | Robert Dewar <dewar@adacore.com> | 2005-09-05 09:52:12 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-09-05 09:52:12 +0200 |
commit | 18605ccc2b1bdac4b7ef05c433ef6bff28d78d96 (patch) | |
tree | 722fb8a9b31307d00a5df98871446194526d8f5e /gcc/ada/binde.adb | |
parent | 009186e083d77ea7e83696601a428c409417b27c (diff) | |
download | gcc-18605ccc2b1bdac4b7ef05c433ef6bff28d78d96.tar.gz |
binde.adb: Minor reformatting
2005-09-01 Robert Dewar <dewar@adacore.com>
* binde.adb: Minor reformatting
(Find_Elab_Order): Output warning if -p used with static elab order
From-SVN: r103856
Diffstat (limited to 'gcc/ada/binde.adb')
-rw-r--r-- | gcc/ada/binde.adb | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/gcc/ada/binde.adb b/gcc/ada/binde.adb index b8895a16c1b..2985b90b9e9 100644 --- a/gcc/ada/binde.adb +++ b/gcc/ada/binde.adb @@ -24,14 +24,15 @@ -- -- ------------------------------------------------------------------------------ -with Binderr; use Binderr; -with Butil; use Butil; -with Debug; use Debug; -with Fname; use Fname; -with Lib; use Lib; -with Namet; use Namet; -with Opt; use Opt; -with Output; use Output; +with Binderr; use Binderr; +with Butil; use Butil; +with Debug; use Debug; +with Fname; use Fname; +with Lib; use Lib; +with Namet; use Namet; +with Opt; use Opt; +with Output; use Output; +with Targparm; use Targparm; package body Binde is @@ -269,7 +270,7 @@ package body Binde is (Unam : Unit_Name_Type; Link : Elab_All_Id) return Elab_All_Id; - -- Make an Elab_All_Entries table entry with the given Unam and Link. + -- Make an Elab_All_Entries table entry with the given Unam and Link function Unit_Id_Of (Uname : Unit_Name_Type) return Unit_Id; -- This function uses the Info field set in the names table to obtain @@ -480,7 +481,6 @@ package body Binde is -- if it becomes zero, then add to no predecessor list. S := UNR.Table (Chosen).Successors; - while S /= No_Successor loop U := Succ.Table (S).After; UNR.Table (U).Num_Pred := UNR.Table (U).Num_Pred - 1; @@ -738,7 +738,6 @@ package body Binde is -- and we should have found and eliminated at least one bad path. raise Program_Error; - end Diagnose_Elaboration_Problem; -------------------- @@ -898,6 +897,20 @@ package body Binde is UNR.Table (UNR.Last).Elab_Position := 0; end loop; + -- Output warning if -p used with no -gnatE units + + if Pessimistic_Elab_Order + and not Dynamic_Elaboration_Checks_Specified + then + if OpenVMS_On_Target then + Error_Msg ("?use of /PESSIMISTIC_ELABORATION questionable"); + else + Error_Msg ("?use of -p switch questionable"); + end if; + + Error_Msg ("?since all units compiled with static elaboration model"); + end if; + -- Gather dependencies and output them if option set Gather_Dependencies; @@ -924,6 +937,7 @@ package body Binde is -- nodes have been chosen. Outer : loop + -- If there are no nodes with predecessors, then either we are -- done, as indicated by Num_Left being set to zero, or we have -- a circularity. In the latter case, diagnose the circularity, |