[Ada] Minor wording changes wrt Ada 202x

2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* par-ch3.adb, par-ch4.adb, scng.adb, sem_aggr.adb,
	sem_ch10.adb, sem_ch12.adb, sem_prag.adb: Update wording: change
	Ada_2020 to Ada 2020 in comments and mention -gnat2020 instead
	of -gnatX switch.
This commit is contained in:
Arnaud Charlet 2020-01-30 03:09:19 -05:00 committed by Pierre-Marie de Rodat
parent d3da83f66f
commit a4c17870b8
7 changed files with 16 additions and 14 deletions

View File

@ -1487,7 +1487,7 @@ package body Ch3 is
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

View File

@ -1690,8 +1690,10 @@ package body Ch4 is
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;
@ -2928,7 +2930,7 @@ package body Ch4 is
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;
@ -3403,7 +3405,7 @@ package body Ch4 is
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;

View File

@ -1617,7 +1617,7 @@ package body Scng is
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

View File

@ -2805,7 +2805,7 @@ package body Sem_Aggr is
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

View File

@ -2706,7 +2706,7 @@ package body Sem_Ch10 is
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;

View File

@ -1096,7 +1096,7 @@ package body Sem_Ch12 is
-- 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
@ -3554,7 +3554,7 @@ package body Sem_Ch12 is
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).
@ -12361,7 +12361,7 @@ package body Sem_Ch12 is
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;
@ -12392,7 +12392,7 @@ package body Sem_Ch12 is
-- 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
@ -13079,7 +13079,7 @@ package body Sem_Ch12 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)

View File

@ -4756,7 +4756,7 @@ package body Sem_Prag is
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
@ -7487,7 +7487,7 @@ package body Sem_Prag is
-- 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
@ -30031,7 +30031,7 @@ package body Sem_Prag is
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