summaryrefslogtreecommitdiff
path: root/ortho
diff options
context:
space:
mode:
Diffstat (limited to 'ortho')
-rw-r--r--ortho/debug/ortho_debug.adb14
-rw-r--r--ortho/gcc/ortho-lang.c15
-rw-r--r--ortho/gcc/ortho_gcc.ads4
3 files changed, 15 insertions, 18 deletions
diff --git a/ortho/debug/ortho_debug.adb b/ortho/debug/ortho_debug.adb
index 633fe70..e2307b9 100644
--- a/ortho/debug/ortho_debug.adb
+++ b/ortho/debug/ortho_debug.adb
@@ -1307,11 +1307,13 @@ package body Ortho_Debug is
Add_Decl (Res);
end New_Const_Decl;
+ -- Const is not modified
+ pragma Warnings (Off, "*is not modified");
+
procedure Start_Const_Value (Const : in out O_Dnode)
is
subtype O_Dnode_Const_Value is O_Dnode_Type (ON_Const_Value);
N : O_Dnode;
- Temp : constant O_Dnode := Const;
begin
if Const.Const_Value /= O_Dnode_Null then
-- Constant already has a value.
@@ -1334,16 +1336,13 @@ package body Ortho_Debug is
Lineno => 0,
Const_Decl => Const,
Value => O_Cnode_Null);
- Temp.Const_Value := N;
- Const := Temp;
+ Const.Const_Value := N;
Add_Decl (N, False);
end Start_Const_Value;
procedure Finish_Const_Value (Const : in out O_Dnode; Val : O_Cnode)
is
- Temp : constant O_Dnode := Const;
begin
-
if Const.Const_Value = O_Dnode_Null then
-- Start_Const_Value not called.
raise Syntax_Error;
@@ -1357,10 +1356,11 @@ package body Ortho_Debug is
raise Type_Error;
end if;
Check_Type (Val.Ctype, Const.Dtype);
- Temp.Const_Value.Value := Val;
- Const := Temp;
+ Const.Const_Value.Value := Val;
end Finish_Const_Value;
+ pragma Warnings (On, "*is not modified");
+
procedure New_Var_Decl
(Res : out O_Dnode;
Ident : O_Ident;
diff --git a/ortho/gcc/ortho-lang.c b/ortho/gcc/ortho-lang.c
index f5cb2bd..370bdd6 100644
--- a/ortho/gcc/ortho-lang.c
+++ b/ortho/gcc/ortho-lang.c
@@ -643,20 +643,21 @@ type_for_size (unsigned int precision, int unsignedp)
&& signed_and_unsigned_types[precision][unsignedp] != NULL_TREE)
return signed_and_unsigned_types[precision][unsignedp];
- if (unsignedp)
+ if (unsignedp)
t = make_unsigned_type (precision);
else
t = make_signed_type (precision);
if (precision <= MAX_BITS_PER_WORD)
signed_and_unsigned_types[precision][unsignedp] = t;
- else
- // Handle larger requests by returning a NULL tree and letting
+ else
+ // Handle larger requests by returning a NULL tree and letting
// the back end default to another approach.
- // the exact test is unknown : distinguishing between 32 and 64 bits may be enough
- // for all likely platforms
- if (MAX_BITS_PER_WORD >= 64) t = NULL_TREE;
-
+ // the exact test is unknown : distinguishing between 32 and 64 bits
+ // may be enough for all likely platforms
+ if (MAX_BITS_PER_WORD >= 64)
+ t = NULL_TREE;
+
return t;
}
diff --git a/ortho/gcc/ortho_gcc.ads b/ortho/gcc/ortho_gcc.ads
index 9ec38cd..9b53568 100644
--- a/ortho/gcc/ortho_gcc.ads
+++ b/ortho/gcc/ortho_gcc.ads
@@ -422,7 +422,6 @@ package Ortho_Gcc is
procedure New_Default_Choice (Block : in out O_Case_Block);
procedure Finish_Choice (Block : in out O_Case_Block);
procedure Finish_Case_Stmt (Block : in out O_Case_Block);
- procedure Debug_Tree_C(Expr : O_Cnode);
private
subtype Tree is System.Address;
@@ -658,7 +657,4 @@ private
pragma Import (C, New_Default_Choice);
pragma Import (C, Finish_Choice);
pragma Import (C, Finish_Case_Stmt);
-
- pragma Import (C, Debug_Tree_C);
-
end Ortho_Gcc;