+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>
* s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
-- code in the floating-point attribute run-time library.
if Is_Floating_Point_Type (Ptyp) then
- declare
+ Float_Valid : declare
Pkg : RE_Id;
Ftp : Entity_Id;
return Entity (Exp_Name);
end Get_Fat_Entity;
+ -- Start of processing for Float_Valid
+
begin
case Float_Rep (Btyp) is
-- Access to Fat_S
Decl : constant Node_Id :=
- Make_Object_Declaration (Loc,
- Defining_Identifier => Temp,
- Aliased_Present => True,
- Object_Definition =>
- New_Occurrence_Of (Ptyp, Loc));
+ Make_Object_Declaration (Loc,
+ Defining_Identifier => Temp,
+ Aliased_Present => True,
+ Object_Definition =>
+ New_Occurrence_Of (Ptyp, Loc));
begin
Set_Aspect_Specifications (Decl, New_List (
Expression =>
Unchecked_Convert_To (Fat_S,
Relocate_Node (Pref)))),
+
Suppress => All_Checks);
Rewrite (Pref, New_Occurrence_Of (Temp, Loc));
Left_Opnd => Convert_To (Btyp, Pref),
Right_Opnd => New_Occurrence_Of (Ptyp, Loc))));
end if;
- end;
+ end Float_Valid;
-- Enumeration type with holes
Apply_Arithmetic_Overflow_Check (N);
return;
end if;
+
+ -- Overflow checks for floating-point if -gnateF mode active
+
+ Check_Float_Op_Overflow (N);
end Expand_N_Op_Add;
---------------------
elsif Is_Integer_Type (Typ) then
Apply_Divide_Checks (N);
end if;
+
+ -- Overflow checks for floating-point if -gnateF mode active
+
+ Check_Float_Op_Overflow (N);
end Expand_N_Op_Divide;
--------------------
elsif Is_Signed_Integer_Type (Etype (N)) then
Apply_Arithmetic_Overflow_Check (N);
end if;
+
+ -- Overflow checks for floating-point if -gnateF mode active
+
+ Check_Float_Op_Overflow (N);
end Expand_N_Op_Multiply;
--------------------
if Is_Signed_Integer_Type (Typ) or else Is_Fixed_Point_Type (Typ) then
Apply_Arithmetic_Overflow_Check (N);
end if;
+
+ -- Overflow checks for floating-point if -gnateF mode active
+
+ Check_Float_Op_Overflow (N);
end Expand_N_Op_Subtract;
---------------------