Commit 97a8fb16 by Arnaud Charlet

[multiple changes]

2009-04-20  Bob Duff  <duff@adacore.com>

	* sem.adb, gnat1drv.adb, debug.adb: Use the -gnatd.W switch to control
	debugging output.

2009-04-20  Robert Dewar  <dewar@adacore.com>

	* sem_attr.adb: Minor reformatting

	* gnatcmd.adb: Minor reformatting

From-SVN: r146417
parent 7340e432
2009-04-20 Bob Duff <duff@adacore.com>
* sem.adb, gnat1drv.adb, debug.adb: Use the -gnatd.W switch to control
debugging output.
2009-04-20 Robert Dewar <dewar@adacore.com>
* sem_attr.adb: Minor reformatting
* gnatcmd.adb: Minor reformatting
2009-04-20 Ed Schonberg <schonberg@adacore.com> 2009-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_User_Defined_Binary_Op): If left operand is * sem_ch4.adb (Analyze_User_Defined_Binary_Op): If left operand is
...@@ -140,7 +140,7 @@ package body Debug is ...@@ -140,7 +140,7 @@ package body Debug is
-- d.T Force Optimize_Alignment (Time) -- d.T Force Optimize_Alignment (Time)
-- d.U -- d.U
-- d.V -- d.V
-- d.W -- d.W Print out debugging information for Walk_Library_Items
-- d.X -- d.X
-- d.Y -- d.Y
-- d.Z -- d.Z
...@@ -559,6 +559,10 @@ package body Debug is ...@@ -559,6 +559,10 @@ package body Debug is
-- d.T Force Optimize_Alignment (Time) mode as the default -- d.T Force Optimize_Alignment (Time) mode as the default
-- d.W Print out debugging information for Walk_Library_Items, including
-- the order in which units are walked. This is primarily for SofCheck
-- Inspector.
-- d1 Error messages have node numbers where possible. Normally error -- d1 Error messages have node numbers where possible. Normally error
-- messages have only source locations. This option is useful when -- messages have only source locations. This option is useful when
-- debugging errors caused by expanded code, where the source location -- debugging errors caused by expanded code, where the source location
......
...@@ -740,9 +740,13 @@ begin ...@@ -740,9 +740,13 @@ begin
Namet.Lock; Namet.Lock;
Stringt.Lock; Stringt.Lock;
-- ???pragma Debug (Check_Library_Items); -- ???Check_Library_Items under control of a debug flag, because it
-- Commented out, because it currently does not work if the -gnatn -- currently does not work if the -gnatn switch (back end inlining) is
-- switch (back end inlining) is used. -- used.
if Debug_Flag_Dot_WW then
Check_Library_Items;
end if;
-- Here we call the back end to generate the output code -- Here we call the back end to generate the output code
......
...@@ -1051,11 +1051,10 @@ procedure GNATCmd is ...@@ -1051,11 +1051,10 @@ procedure GNATCmd is
else else
declare declare
Switch : constant String := Switch : constant String :=
Last_Switches.Table (J).all; Last_Switches.Table (J).all;
ALI_File : constant String (1 .. Switch'Length + 4) :=
ALI_File : constant String (1 .. Switch'Length + 4) := Switch & ".ali";
Switch & ".ali";
Test_Existence : Boolean := False; Test_Existence : Boolean := False;
......
...@@ -63,8 +63,8 @@ pragma Warnings (Off, Sem_Util); ...@@ -63,8 +63,8 @@ pragma Warnings (Off, Sem_Util);
package body Sem is package body Sem is
Debug_Unit_Walk : constant Boolean := False; Debug_Unit_Walk : Boolean renames Debug_Flag_Dot_WW;
-- Set to True to print out debugging information for Walk_Library_Items -- Controls debugging printouts for Walk_Library_Items
Outer_Generic_Scope : Entity_Id := Empty; Outer_Generic_Scope : Entity_Id := Empty;
-- Global reference to the outer scope that is generic. In a non -- Global reference to the outer scope that is generic. In a non
...@@ -1564,7 +1564,9 @@ package body Sem is ...@@ -1564,7 +1564,9 @@ package body Sem is
Write_Unit_Info (Unit_Num, Item); Write_Unit_Info (Unit_Num, Item);
end if; end if;
-- ??? why is this commented out -- This assertion is commented out because it fails in some
-- circumstances related to library-level generic
-- instantiations. We need to investigate why.
-- ???pragma Assert (not Seen (Unit_Num)); -- ???pragma Assert (not Seen (Unit_Num));
Seen (Unit_Num) := True; Seen (Unit_Num) := True;
......
...@@ -6153,12 +6153,11 @@ package body Sem_Attr is ...@@ -6153,12 +6153,11 @@ package body Sem_Attr is
Ind : Node_Id; Ind : Node_Id;
begin begin
-- In the case of a generic index type, the bounds may -- In the case of a generic index type, the bounds may appear static
-- appear static but the computation is not meaningful, -- but the computation is not meaningful in this case, and may
-- and may generate a spurious warning. -- generate a spurious warning.
Ind := First_Index (P_Type); Ind := First_Index (P_Type);
while Present (Ind) loop while Present (Ind) loop
if Is_Generic_Type (Etype (Ind)) then if Is_Generic_Type (Etype (Ind)) then
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment