+2014-02-25 Yannick Moy <moy@adacore.com>
+
+ * sem_prag.adb: Minor reformatting to get consistent messages.
+
+2014-02-25 Robert Dewar <dewar@adacore.com>
+
+ * checks.adb: Minor reformatting.
+ * sinfo.ads (Do_Range_Check): Document that this flag is never
+ passed to the back end.
+
2014-02-25 Yannick Moy <moy@adacore.com>
* sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
Loc : constant Source_Ptr := Sloc (Ck_Node);
Checks_On : constant Boolean :=
not Index_Checks_Suppressed (Target_Typ)
- or else not Range_Checks_Suppressed (Target_Typ);
+ or else
+ not Range_Checks_Suppressed (Target_Typ);
Cond : Node_Id;
R_Cno : Node_Id;
R_Result : Check_Result;
begin
- if not Expander_Active or else not Checks_On then
+ if not Expander_Active or not Checks_On then
return;
end if;
if Nkind (Ck_Node) = N_Range then
Apply_Compile_Time_Constraint_Error
- (Low_Bound (Ck_Node), "static range out of bounds of}??",
+ (Low_Bound (Ck_Node),
+ "static range out of bounds of}??",
CE_Range_Check_Failed,
Ent => Target_Typ,
Typ => Target_Typ);
else
Apply_Compile_Time_Constraint_Error
- (Ck_Node, "static value out of range of}?",
+ (Ck_Node,
+ "static value out of range of}?",
CE_Range_Check_Failed,
Ent => Target_Typ,
Typ => Target_Typ);
else
Error_Msg_N
- ("item must denote parameter, variable or state",
+ ("item must denote parameter, variable, or state",
Item);
end if;
end if;
-- particular, these flags should also be correctly set in ASIS mode and
-- GNATprove mode.
+ -- Note: the expander always takes care of the Do_Range check case,
+ -- so this flag will never be set in the expanded tree passed to the
+ -- back end code generator.
+
-- Note that this accounts for all nodes that trigger the corresponding
-- checks, except for range checks on subtype_indications, which may be
-- required to check that a range_constraint is compatible with the given