Commit dfaff97b by Robert Dewar Committed by Arnaud Charlet

exp_ch4.adb: Minor reformatting.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Minor reformatting.
	* exp_attr.adb: Minor reformatting.

From-SVN: r213541
parent 8575023c
2014-08-04 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
* exp_attr.adb: Minor reformatting.
2014-08-04 Thomas Quinot <quinot@adacore.com> 2014-08-04 Thomas Quinot <quinot@adacore.com>
* s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
......
...@@ -6403,7 +6403,7 @@ package body Exp_Attr is ...@@ -6403,7 +6403,7 @@ package body Exp_Attr is
-- code in the floating-point attribute run-time library. -- code in the floating-point attribute run-time library.
if Is_Floating_Point_Type (Ptyp) then if Is_Floating_Point_Type (Ptyp) then
declare Float_Valid : declare
Pkg : RE_Id; Pkg : RE_Id;
Ftp : Entity_Id; Ftp : Entity_Id;
...@@ -6424,6 +6424,8 @@ package body Exp_Attr is ...@@ -6424,6 +6424,8 @@ package body Exp_Attr is
return Entity (Exp_Name); return Entity (Exp_Name);
end Get_Fat_Entity; end Get_Fat_Entity;
-- Start of processing for Float_Valid
begin begin
case Float_Rep (Btyp) is case Float_Rep (Btyp) is
...@@ -6463,11 +6465,11 @@ package body Exp_Attr is ...@@ -6463,11 +6465,11 @@ package body Exp_Attr is
-- Access to Fat_S -- Access to Fat_S
Decl : constant Node_Id := Decl : constant Node_Id :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Temp, Defining_Identifier => Temp,
Aliased_Present => True, Aliased_Present => True,
Object_Definition => Object_Definition =>
New_Occurrence_Of (Ptyp, Loc)); New_Occurrence_Of (Ptyp, Loc));
begin begin
Set_Aspect_Specifications (Decl, New_List ( Set_Aspect_Specifications (Decl, New_List (
...@@ -6492,6 +6494,7 @@ package body Exp_Attr is ...@@ -6492,6 +6494,7 @@ package body Exp_Attr is
Expression => Expression =>
Unchecked_Convert_To (Fat_S, Unchecked_Convert_To (Fat_S,
Relocate_Node (Pref)))), Relocate_Node (Pref)))),
Suppress => All_Checks); Suppress => All_Checks);
Rewrite (Pref, New_Occurrence_Of (Temp, Loc)); Rewrite (Pref, New_Occurrence_Of (Temp, Loc));
...@@ -6525,7 +6528,7 @@ package body Exp_Attr is ...@@ -6525,7 +6528,7 @@ package body Exp_Attr is
Left_Opnd => Convert_To (Btyp, Pref), Left_Opnd => Convert_To (Btyp, Pref),
Right_Opnd => New_Occurrence_Of (Ptyp, Loc)))); Right_Opnd => New_Occurrence_Of (Ptyp, Loc))));
end if; end if;
end; end Float_Valid;
-- Enumeration type with holes -- Enumeration type with holes
......
...@@ -6496,6 +6496,10 @@ package body Exp_Ch4 is ...@@ -6496,6 +6496,10 @@ package body Exp_Ch4 is
Apply_Arithmetic_Overflow_Check (N); Apply_Arithmetic_Overflow_Check (N);
return; return;
end if; end if;
-- Overflow checks for floating-point if -gnateF mode active
Check_Float_Op_Overflow (N);
end Expand_N_Op_Add; end Expand_N_Op_Add;
--------------------- ---------------------
...@@ -6704,6 +6708,10 @@ package body Exp_Ch4 is ...@@ -6704,6 +6708,10 @@ package body Exp_Ch4 is
elsif Is_Integer_Type (Typ) then elsif Is_Integer_Type (Typ) then
Apply_Divide_Checks (N); Apply_Divide_Checks (N);
end if; end if;
-- Overflow checks for floating-point if -gnateF mode active
Check_Float_Op_Overflow (N);
end Expand_N_Op_Divide; end Expand_N_Op_Divide;
-------------------- --------------------
...@@ -8462,6 +8470,10 @@ package body Exp_Ch4 is ...@@ -8462,6 +8470,10 @@ package body Exp_Ch4 is
elsif Is_Signed_Integer_Type (Etype (N)) then elsif Is_Signed_Integer_Type (Etype (N)) then
Apply_Arithmetic_Overflow_Check (N); Apply_Arithmetic_Overflow_Check (N);
end if; end if;
-- Overflow checks for floating-point if -gnateF mode active
Check_Float_Op_Overflow (N);
end Expand_N_Op_Multiply; end Expand_N_Op_Multiply;
-------------------- --------------------
...@@ -9187,6 +9199,10 @@ package body Exp_Ch4 is ...@@ -9187,6 +9199,10 @@ package body Exp_Ch4 is
if Is_Signed_Integer_Type (Typ) or else Is_Fixed_Point_Type (Typ) then if Is_Signed_Integer_Type (Typ) or else Is_Fixed_Point_Type (Typ) then
Apply_Arithmetic_Overflow_Check (N); Apply_Arithmetic_Overflow_Check (N);
end if; end if;
-- Overflow checks for floating-point if -gnateF mode active
Check_Float_Op_Overflow (N);
end Expand_N_Op_Subtract; end Expand_N_Op_Subtract;
--------------------- ---------------------
......
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