-- that outside of spec expressions, otherwise the declaration
-- cannot be inserted and analyzed. In such a case, GNATprove
-- later rejects the allocator as it is not used here in
- -- a non-interfering context (SPARK 4.8(2) and 7.1.3(12)).
+ -- a non-interfering context (SPARK 4.8(2) and 7.1.3(10)).
if Expander_Active
or else (GNATprove_Mode and then not In_Spec_Expression)
-- A procedure cannot have an effectively volatile formal
-- parameter of mode IN because it behaves as a constant
- -- (SPARK RM 7.1.3(6)). -- ??? maybe 7.1.3(4)
+ -- (SPARK RM 7.1.3(4)).
elsif Ekind (Scope (Formal)) = E_Procedure
and then Ekind (Formal) = E_In_Parameter
procedure Flag_Effectively_Volatile_Objects (Expr : Node_Id);
-- Emit an error concerning the illegal usage of an effectively volatile
- -- object in interfering context (SPARK RM 7.1.3(12)).
+ -- object in interfering context (SPARK RM 7.1.3(10)).
procedure Insert_Default;
-- If the actual is missing in a call, insert in the actuals list
then
Error_Msg_N
("volatile object cannot appear in this context (SPARK "
- & "RM 7.1.3(11))", N);
+ & "RM 7.1.3(10))", N);
return Skip;
end if;
end if;
-- An effectively volatile object may act as an actual when the
-- corresponding formal is of a non-scalar effectively volatile
- -- type (SPARK RM 7.1.3(11)).
+ -- type (SPARK RM 7.1.3(10)).
if not Is_Scalar_Type (Etype (F))
and then Is_Effectively_Volatile (Etype (F))
-- An effectively volatile object may act as an actual in a
-- call to an instance of Unchecked_Conversion.
- -- (SPARK RM 7.1.3(11)).
+ -- (SPARK RM 7.1.3(10)).
elsif Is_Unchecked_Conversion_Instance (Nam) then
null;
elsif Is_Effectively_Volatile_Object (A) then
Error_Msg_N
("volatile object cannot act as actual in a call (SPARK "
- & "RM 7.1.3(11))", A);
+ & "RM 7.1.3(10))", A);
-- Otherwise the actual denotes an expression. Inspect the
-- expression and flag each effectively volatile object with
-- An effectively volatile object subject to enabled properties
-- Async_Writers or Effective_Reads must appear in non-interfering
- -- context (SPARK RM 7.1.3(12)).
+ -- context (SPARK RM 7.1.3(10)).
if Is_Object (E)
and then Is_Effectively_Volatile (E)
then
SPARK_Msg_N
("volatile object cannot appear in this context "
- & "(SPARK RM 7.1.3(12))", N);
+ & "(SPARK RM 7.1.3(10))", N);
end if;
-- Check for possible elaboration issues with respect to reads of