diff options
Diffstat (limited to 'ortho/debug')
-rw-r--r-- | ortho/debug/ortho_debug-disp.adb | 14 | ||||
-rw-r--r-- | ortho/debug/ortho_debug-main.adb | 1 | ||||
-rw-r--r-- | ortho/debug/ortho_debug.adb | 25 | ||||
-rw-r--r-- | ortho/debug/ortho_debug.private.ads | 3 |
4 files changed, 22 insertions, 21 deletions
diff --git a/ortho/debug/ortho_debug-disp.adb b/ortho/debug/ortho_debug-disp.adb index 36c1750..b97ff50 100644 --- a/ortho/debug/ortho_debug-disp.adb +++ b/ortho/debug/ortho_debug-disp.adb @@ -109,6 +109,7 @@ package body Ortho_Debug.Disp is is Status : size_t; Res : int; + pragma Unreferenced (Status, Res); begin if Ctx.Line_Len > 0 then Status := fwrite (Ctx.Line'Address, size_t (Ctx.Line_Len), 1, @@ -176,6 +177,7 @@ package body Ortho_Debug.Disp is procedure New_Line is Status : int; + pragma Unreferenced (Status); begin if Ctx.Line_Len > 0 then Flush; @@ -185,8 +187,9 @@ package body Ortho_Debug.Disp is Ctx.Next_Tab := Ctx.Tab; end New_Line; - procedure Put (C : Character) is - S : String (1 .. 1) := (1 => C); + procedure Put (C : Character) + is + S : constant String (1 .. 1) := (1 => C); begin Put (S); end Put; @@ -364,6 +367,8 @@ package body Ortho_Debug.Disp is end case; end Get_Lnode_Name; + pragma Unreferenced (Get_Lnode_Name); + procedure Disp_Enode_Name (Kind : OE_Kind) is begin Put (Get_Enode_Name (Kind)); @@ -388,7 +393,7 @@ package body Ortho_Debug.Disp is function Image (Lit : Integer) return String is - S : String := Integer'Image (Lit); + S : constant String := Integer'Image (Lit); begin if S (1) = ' ' then return S (2 .. S'Length); @@ -997,4 +1002,7 @@ package body Ortho_Debug.Disp is Disp_Snode (N, null); Pop_Context (Ctx); end Debug_Snode; + + pragma Unreferenced (Debug_Tnode, Debug_Enode, Debug_Fnode, + Debug_Dnode, Debug_Lnode, Debug_Snode); end Ortho_Debug.Disp; diff --git a/ortho/debug/ortho_debug-main.adb b/ortho/debug/ortho_debug-main.adb index 714b853..b470dea 100644 --- a/ortho/debug/ortho_debug-main.adb +++ b/ortho/debug/ortho_debug-main.adb @@ -136,6 +136,7 @@ begin if Output /= NULL_Stream then declare Status : int; + pragma Unreferenced (Status); begin Status := fclose (Output); end; diff --git a/ortho/debug/ortho_debug.adb b/ortho/debug/ortho_debug.adb index 2cb4d42..7ca70c1 100644 --- a/ortho/debug/ortho_debug.adb +++ b/ortho/debug/ortho_debug.adb @@ -972,16 +972,7 @@ package body Ortho_Debug is is subtype O_Lnode_Indexed is O_Lnode_Type (OL_Indexed_Element); Res : O_Lnode; - Rtype : O_Tnode; begin - case Arr.Rtype.Kind is - when ON_Array_Type => - Rtype := Arr.Rtype.El_Type; - when ON_Array_Sub_Type => - Rtype := Arr.Rtype.Base_Type.El_Type; - when others => - raise Type_Error; - end case; Check_Ref (Arr); Res := new O_Lnode_Indexed'(Kind => OL_Indexed_Element, Rtype => Get_Base_Type (Arr.Rtype).El_Type, @@ -1231,20 +1222,20 @@ package body Ortho_Debug is procedure New_Debug_Line_Decl (Line : Natural) is - subtype O_Dnode_Line_Decl is O_Dnode (ON_Debug_Line_Decl); - N : O_Dnode_Line_Decl; + subtype O_Dnode_Line_Decl is O_Dnode_Type (ON_Debug_Line_Decl); + N : O_Dnode; begin - N := new O_Dnode_Type (ON_Debug_Line_Decl); + N := new O_Dnode_Line_Decl; N.Line := Line; Add_Decl (N, False); end New_Debug_Line_Decl; procedure New_Debug_Comment_Decl (Comment : String) is - subtype O_Dnode_Comment_Decl is O_Dnode (ON_Debug_Comment_Decl); - N : O_Dnode_Comment_Decl; + subtype O_Dnode_Comment_Decl is O_Dnode_Type (ON_Debug_Comment_Decl); + N : O_Dnode; begin - N := new O_Dnode_Type (ON_Debug_Comment_Decl); + N := new O_Dnode_Comment_Decl; N.Comment := new String'(Comment); Add_Decl (N, False); end New_Debug_Comment_Decl; @@ -1321,6 +1312,8 @@ package body Ortho_Debug is subtype O_Dnode_Const_Value is O_Dnode_Type (ON_Const_Value); N : O_Dnode; begin + Const := Const; + if Const.Const_Value /= O_Dnode_Null then -- Constant already has a value. raise Syntax_Error; @@ -1349,6 +1342,8 @@ package body Ortho_Debug is procedure Finish_Const_Value (Const : in out O_Dnode; Val : O_Cnode) is begin + Const := Const; + if Const.Const_Value = O_Dnode_Null then -- Start_Const_Value not called. raise Syntax_Error; diff --git a/ortho/debug/ortho_debug.private.ads b/ortho/debug/ortho_debug.private.ads index ab77b55..03489c5 100644 --- a/ortho/debug/ortho_debug.private.ads +++ b/ortho/debug/ortho_debug.private.ads @@ -16,9 +16,6 @@ -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with Ortho_Ident; -use Ortho_Ident; - package Ortho_Debug is type O_Enode is private; type O_Cnode is private; |