+2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * checks.adb (Activate_Overflow_Check): Remove redundant
+ argument.
+ * exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
+ (Expand_N_Type_Conversion): Do not reset it here.
+
2019-07-23 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Component_Layout): Pass Decimal to UI_Write.
-- Fall through for cases where we do set the flag
- Set_Do_Overflow_Check (N, True);
+ Set_Do_Overflow_Check (N);
Possible_Local_Raise (N, Standard_Constraint_Error);
end Activate_Overflow_Check;
Rewrite (Expr, Unchecked_Convert_To (Ityp, Expr));
end if;
+ -- Reset overflow flag, since the range check will include
+ -- dealing with possible overflow, and generate the check.
+
+ Set_Do_Overflow_Check (N, False);
+
Generate_Range_Check (Expr, Target_Type, CE_Range_Check_Failed);
end Discrete_Range_Check;
or else (Is_Fixed_Point_Type (Etype (Expression (N)))
and then Conversion_OK (N)))
then
- -- Reset overflow flag, since the range check will include
- -- dealing with possible overflow, and generate the check.
-
- Set_Do_Overflow_Check (N, False);
-
-- If Address is either a source type or target type,
-- suppress range check to avoid typing anomalies when
-- it is a visible integer type.