if Ada_Version < Ada_2020 then
Error_Msg_SC
("object renaming without subtype is an Ada 202x feature");
- Error_Msg_SC ("\compile with -gnatX");
+ Error_Msg_SC ("\compile with -gnat2020");
end if;
Scan; -- past renames
Set_Component_Associations (Aggregate_Node, Assoc_List);
Set_Is_Homogeneous_Aggregate (Aggregate_Node);
Scan; -- past right bracket
+
if Token = Tok_Apostrophe then
Scan;
+
if Token = Tok_Identifier then
return P_Reduction_Attribute_Reference (Aggregate_Node);
end if;
when Tok_At_Sign => -- AI12-0125 : target_name
if Ada_Version < Ada_2020 then
Error_Msg_SC ("target name is an Ada 202x feature");
- Error_Msg_SC ("\compile with -gnatX");
+ Error_Msg_SC ("\compile with -gnat2020");
end if;
Node1 := P_Name;
if Ada_Version < Ada_2020 then
Error_Msg_SC ("iterated component is an Ada 202x feature");
- Error_Msg_SC ("\compile with -gnatX");
+ Error_Msg_SC ("\compile with -gnat2020");
end if;
return Assoc_Node;
when '@' =>
if Ada_Version < Ada_2020 then
- Error_Msg ("target_name is an Ada 2020 feature", Scan_Ptr);
+ Error_Msg ("target_name is an Ada 202x feature", Scan_Ptr);
Scan_Ptr := Scan_Ptr + 1;
else
begin
if Ada_Version < Ada_2020 then
Error_Msg_N ("delta_aggregate is an Ada 202x feature", N);
- Error_Msg_N ("\compile with -gnatX", N);
+ Error_Msg_N ("\compile with -gnat2020", N);
end if;
if not Is_Composite_Type (Typ) then
if Ada_Version < Ada_2020
and then Warn_On_Ada_202X_Compatibility
then
- Error_Msg_N ("& is an Ada 202X unit?i?", Name (N));
+ Error_Msg_N ("& is an Ada 202x unit?i?", Name (N));
end if;
end case;
end if;
-- package. As usual an other association must be last in the list.
procedure Build_Subprogram_Wrappers;
- -- Ada_2020: AI12-0272 introduces pre/postconditions for formal
+ -- Ada 2020: AI12-0272 introduces pre/postconditions for formal
-- subprograms. The implementation of making the formal into a renaming
-- of the actual does not work, given that subprogram renaming cannot
-- carry aspect specifications. Instead we must create subprogram
Generate_Reference_To_Generic_Formals (Current_Scope);
- -- For Ada_2020, some formal parameters can carry aspects, which must
+ -- For Ada 2020, some formal parameters can carry aspects, which must
-- be name-resolved at the end of the list of formal parameters (which
-- has the semantics of a declaration list).
Subt : Entity_Id;
procedure Check_Shared_Variable_Control_Aspects;
- -- Ada_2020: Verify that shared variable control aspects (RM C.6)
+ -- Ada 2020: Verify that shared variable control aspects (RM C.6)
-- that may be specified for a formal type are obeyed by the actual.
procedure Diagnose_Predicated_Actual;
-- Check_Shared_Variable_Control_Aspects --
--------------------------------------------
- -- Ada_2020: Verify that shared variable control aspects (RM C.6)
+ -- Ada 2020: Verify that shared variable control aspects (RM C.6)
-- that may be specified for the formal are obeyed by the actual.
procedure Check_Shared_Variable_Control_Aspects is
-- Perform atomic/volatile checks (RM C.6(12)). Note that AI05-0218-1
-- removes the second instance of the phrase "or allow pass by copy".
- -- For Ada_2020, the aspect may be specified explicitly for the
+ -- For Ada 2020, the aspect may be specified explicitly for the
-- formal regardless of whether an ancestor obeys it.
if Is_Atomic (Act_T)
then
null;
- -- For Ada_2020, pre/postconditions can appear on formal subprograms
+ -- For Ada 2020, pre/postconditions can appear on formal subprograms
elsif Nkind (Subp_Decl) = N_Formal_Concrete_Subprogram_Declaration
and then Ada_Version >= Ada_2020
-- Attribute belongs on the base type. If the view of the type is
-- currently private, it also belongs on the underlying type.
- -- In Ada_2020, the pragma can apply to a formal type, for which
+ -- In Ada 2020, the pragma can apply to a formal type, for which
-- there may be no underlying type.
if Prag_Id = Pragma_Atomic
elsif Present (Generic_Parent (Specification (Stmt))) then
return Stmt;
- -- Ada_2020: contract on formal subprogram
+ -- Ada 2020: contract on formal subprogram
elsif Is_Generic_Actual_Subprogram (Defining_Entity (Stmt))
and then Ada_Version >= Ada_2020