From de54c5aba9e149264f53a2ffb55ba0501288a771 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 11 Oct 2010 09:20:53 +0000 Subject: [PATCH] 2010-10-11 Bob Duff * par-ch9.adb, sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb, switch-c.adb, exp_attr.adb, exp_ch9.adb, par-ch11.adb, usage.adb, sem_ch9.adb, sem_ch10.adb, scng.adb, checks.adb, sem_prag.adb, sem_ch12.adb, par-ch2.adb, freeze.adb, par-ch4.adb, sem_util.adb, sem_res.adb, sem_attr.adb, par-ch6.adb, exp_ch4.adb, exp_ch6.adb, sem_ch4.adb, exp_ch8.adb, par-ch10.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb, par-ch12.adb, sem_ch8.adb, snames.adb-tmpl, opt.ads, exp_aggr.adb, sem_cat.adb, sem_ch13.adb, par-ch3.adb, exp_strm.adb, exp_cg.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Use Ada_2005 instead of Ada_05 (Ada_Version_Type). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165283 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 14 +++++++++ gcc/ada/checks.adb | 6 ++-- gcc/ada/exp_aggr.adb | 2 +- gcc/ada/exp_attr.adb | 14 ++++----- gcc/ada/exp_cg.adb | 2 +- gcc/ada/exp_ch3.adb | 24 +++++++-------- gcc/ada/exp_ch4.adb | 16 +++++----- gcc/ada/exp_ch5.adb | 4 +-- gcc/ada/exp_ch6.adb | 16 +++++----- gcc/ada/exp_ch8.adb | 2 +- gcc/ada/exp_ch9.adb | 32 +++++++++---------- gcc/ada/exp_disp.adb | 8 ++--- gcc/ada/exp_imgv.adb | 4 +-- gcc/ada/exp_strm.adb | 2 +- gcc/ada/exp_util.adb | 2 +- gcc/ada/freeze.adb | 6 ++-- gcc/ada/impunit.adb | 2 +- gcc/ada/impunit.ads | 2 +- gcc/ada/lib-xref.adb | 2 +- gcc/ada/opt.ads | 9 +++--- gcc/ada/par-ch10.adb | 4 +-- gcc/ada/par-ch11.adb | 2 +- gcc/ada/par-ch12.adb | 14 ++++----- gcc/ada/par-ch2.adb | 2 +- gcc/ada/par-ch3.adb | 36 +++++++++++----------- gcc/ada/par-ch4.adb | 2 +- gcc/ada/par-ch6.adb | 10 +++--- gcc/ada/par-ch9.adb | 8 ++--- gcc/ada/par-prag.adb | 4 +-- gcc/ada/scng.adb | 6 ++-- gcc/ada/sem_aggr.adb | 24 +++++++-------- gcc/ada/sem_attr.adb | 36 +++++++++++----------- gcc/ada/sem_cat.adb | 18 +++++------ gcc/ada/sem_ch10.adb | 8 ++--- gcc/ada/sem_ch12.adb | 14 ++++----- gcc/ada/sem_ch13.adb | 2 +- gcc/ada/sem_ch3.adb | 82 ++++++++++++++++++++++++------------------------- gcc/ada/sem_ch4.adb | 18 +++++------ gcc/ada/sem_ch5.adb | 6 ++-- gcc/ada/sem_ch6.adb | 38 +++++++++++------------ gcc/ada/sem_ch8.adb | 16 +++++----- gcc/ada/sem_ch9.adb | 18 +++++------ gcc/ada/sem_disp.adb | 8 ++--- gcc/ada/sem_prag.adb | 16 +++++----- gcc/ada/sem_res.adb | 24 +++++++-------- gcc/ada/sem_type.adb | 20 ++++++------ gcc/ada/sem_util.adb | 12 ++++---- gcc/ada/snames.adb-tmpl | 4 +-- gcc/ada/switch-c.adb | 4 +-- gcc/ada/usage.adb | 2 +- 50 files changed, 320 insertions(+), 307 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b10ca61..c46da7e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,19 @@ 2010-10-11 Bob Duff + * par-ch9.adb, sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, impunit.adb, + impunit.ads, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb, + switch-c.adb, exp_attr.adb, exp_ch9.adb, par-ch11.adb, usage.adb, + sem_ch9.adb, sem_ch10.adb, scng.adb, checks.adb, sem_prag.adb, + sem_ch12.adb, par-ch2.adb, freeze.adb, par-ch4.adb, sem_util.adb, + sem_res.adb, sem_attr.adb, par-ch6.adb, exp_ch4.adb, exp_ch6.adb, + sem_ch4.adb, exp_ch8.adb, par-ch10.adb, sem_ch6.adb, par-prag.adb, + exp_disp.adb, par-ch12.adb, sem_ch8.adb, snames.adb-tmpl, opt.ads, + exp_aggr.adb, sem_cat.adb, sem_ch13.adb, par-ch3.adb, exp_strm.adb, + exp_cg.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Use Ada_2005 + instead of Ada_05 (Ada_Version_Type). + +2010-10-11 Bob Duff + * sem_aggr.adb, impunit.adb, impunit.ads, switch-c.adb, usage.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, par-ch4.adb, par-ch6.adb, par-ch8.adb, exp_ch4.adb, sem_ch4.adb, sem_ch6.adb, par-prag.adb, diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 2362c13..9a942d9 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -1193,11 +1193,11 @@ package body Checks is if Present (Lhs) and then (Present (Param_Entity (Lhs)) - or else (Ada_Version < Ada_05 + or else (Ada_Version < Ada_2005 and then not Is_Constrained (T_Typ) and then Is_Aliased_View (Lhs) and then not Is_Aliased_Unconstrained_Component) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then not Is_Constrained (T_Typ) and then Denotes_Explicit_Dereference (Lhs) and then Nkind (Original_Node (Lhs)) /= @@ -1216,7 +1216,7 @@ package body Checks is -- Ada 2005: nothing to do if the type is one for which there is a -- partial view that is constrained. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Has_Constrained_Partial_View (Base_Type (T_Typ)) then return; diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index a352587..566b1a3 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -5598,7 +5598,7 @@ package body Exp_Aggr is -- Extension aggregates, aggregates in extended return statements, and -- aggregates for C++ imported types must be expanded. - if Ada_Version >= Ada_05 and then Is_Immutably_Limited_Type (Typ) then + if Ada_Version >= Ada_2005 and then Is_Immutably_Limited_Type (Typ) then if not Nkind_In (Parent (N), N_Object_Declaration, N_Component_Association) then diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 7af8cab..e573906 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -653,7 +653,7 @@ package body Exp_Attr is -- eventually we plan to expand the functions that are treated as -- build-in-place to include other composite result types. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Pref) then Make_Build_In_Place_Call_In_Anonymous_Context (Pref); @@ -1396,7 +1396,7 @@ package body Exp_Attr is -- to Callable. Generate: -- callable (Task_Id (Pref._disp_get_task_id)); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Ptyp) = E_Class_Wide_Type and then Is_Interface (Ptyp) and then Is_Task_Interface (Ptyp) @@ -1627,9 +1627,9 @@ package body Exp_Attr is elsif not Is_Variable (Pref) or else Present (Formal_Ent) - or else (Ada_Version < Ada_05 + or else (Ada_Version < Ada_2005 and then Is_Aliased_View (Pref)) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then Is_Constrained_Aliased_View (Pref)) then Res := True; @@ -2206,7 +2206,7 @@ package body Exp_Attr is -- dynamically through a dispatching call, as for other task -- attributes applied to interfaces. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Ptyp) = E_Class_Wide_Type and then Is_Interface (Ptyp) and then Is_Task_Interface (Ptyp) @@ -3174,7 +3174,7 @@ package body Exp_Attr is -- We cannot figure out a practical way to implement this -- accessibility check on virtual machines, so we omit it. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Tagged_Type_Expansion then Insert_Action (N, @@ -4471,7 +4471,7 @@ package body Exp_Attr is -- Generate: -- terminated (Task_Id (Pref._disp_get_task_id)); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Ptyp) = E_Class_Wide_Type and then Is_Interface (Ptyp) and then Is_Task_Interface (Ptyp) diff --git a/gcc/ada/exp_cg.adb b/gcc/ada/exp_cg.adb index f549c58..995f421 100644 --- a/gcc/ada/exp_cg.adb +++ b/gcc/ada/exp_cg.adb @@ -321,7 +321,7 @@ package body Exp_CG is end if; end loop; - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then for J in Predef_Names_05'Range loop Get_Name_String (Predef_Names_05 (J)); diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 156a83d..2cc0b58 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -2459,7 +2459,7 @@ package body Exp_Ch3 is -- located at fixed positions (tags whose position depends on -- variable size components are initialized later ---see below) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) then @@ -2514,7 +2514,7 @@ package body Exp_Ch3 is -- located at fixed positions (tags whose position depends on -- variable size components are initialized later ---see below) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) then @@ -2583,7 +2583,7 @@ package body Exp_Ch3 is -- depend on discriminants is only safely read at runtime after -- the parent components have been initialized. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) and then Has_Discriminants (Etype (Rec_Type)) @@ -4322,7 +4322,7 @@ package body Exp_Ch3 is Expand_Access_Protected_Subprogram_Type (N); end if; - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Array_Type (Def_Id) and then Is_Access_Type (Component_Type (Def_Id)) and then Ekind (Component_Type (Def_Id)) = E_Anonymous_Access_Type @@ -4332,7 +4332,7 @@ package body Exp_Ch3 is elsif Has_Task (Def_Id) then Expand_Previous_Access_Type (Def_Id); - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then (Is_Record_Type (Def_Id) or else (Is_Array_Type (Def_Id) @@ -4770,7 +4770,7 @@ package body Exp_Ch3 is -- plan to expand the allowed forms of functions that are treated as -- build-in-place. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Expr_Q) then Make_Build_In_Place_Call_In_Object_Declaration (N, Expr_Q); @@ -6075,7 +6075,7 @@ package body Exp_Ch3 is -- a function returns an extension aggregate that invokes the -- the parent function. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then not Is_Abstract_Type (Def_Id) and then Is_Null_Extension (Def_Id) then @@ -6090,7 +6090,7 @@ package body Exp_Ch3 is -- overridden. This is done to ensure that the dispatch table -- entry associated with such null primitives are properly filled. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Etype (Def_Id) /= Def_Id and then not Is_Abstract_Type (Def_Id) and then Has_Interfaces (Def_Id) @@ -8359,7 +8359,7 @@ package body Exp_Ch3 is -- disable their generation in this case. Disable the generation of -- these bodies if No_Dispatching_Calls, Ravenscar or ZFP is active. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Tagged_Type_Expansion and then not Restriction_Active (No_Dispatching_Calls) and then not Restriction_Active (No_Select_Statements) @@ -8866,7 +8866,7 @@ package body Exp_Ch3 is -- disable their generation in this case. Disable the generation of -- these bodies if No_Dispatching_Calls, Ravenscar or ZFP is active. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Tagged_Type_Expansion and then not Is_Interface (Tag_Typ) and then @@ -9053,14 +9053,14 @@ package body Exp_Ch3 is Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Input (Typ) or else - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then Stream_Operation_OK (Typ, TSS_Stream_Read)); elsif Operation = TSS_Stream_Output then Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Output (Typ) or else - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then Stream_Operation_OK (Typ, TSS_Stream_Write)); end if; diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index a3fca28..d501cd5 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -515,7 +515,7 @@ package body Exp_Ch4 is -- Note: we skip the accessibility check for the VM case, since -- there does not seem to be any practical way of implementing it. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Tagged_Type_Expansion and then Is_Class_Wide_Type (DesigT) and then not Scope_Suppress (Accessibility_Check) @@ -635,7 +635,7 @@ package body Exp_Ch4 is -- we plan to expand the allowed forms of functions that are treated -- as build-in-place. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Exp) then Make_Build_In_Place_Call_In_Allocator (N, Exp); @@ -1085,7 +1085,7 @@ package body Exp_Ch4 is -- we plan to expand the allowed forms of functions that are treated -- as build-in-place. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Exp) then Make_Build_In_Place_Call_In_Allocator (N, Exp); @@ -3773,7 +3773,7 @@ package body Exp_Ch4 is if not Is_Constrained (Typ) and then Present (Discriminant_Default_Value (First_Discriminant (Typ))) - and then (Ada_Version < Ada_05 + and then (Ada_Version < Ada_2005 or else not Has_Constrained_Partial_View (Typ)) then @@ -3790,7 +3790,7 @@ package body Exp_Ch4 is -- anonymous access type make sure an accessibility -- check is inserted if necessary (3.10.2(22.q/2)) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Etype (Nod)) = E_Anonymous_Access_Type then @@ -4860,7 +4860,7 @@ package body Exp_Ch4 is -- Ada 2005 (AI-318-02): If the prefix is a call to a build-in-place -- function, then additional actuals must be passed. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (P) then Make_Build_In_Place_Call_In_Anonymous_Context (P); @@ -7450,7 +7450,7 @@ package body Exp_Ch4 is -- Ada 2005 (AI-318-02): If the prefix is a call to a build-in-place -- function, then additional actuals must be passed. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (P) then Make_Build_In_Place_Call_In_Anonymous_Context (P); @@ -7749,7 +7749,7 @@ package body Exp_Ch4 is -- Ada 2005 (AI-318-02): If the prefix is a call to a build-in-place -- function, then additional actuals must be passed. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Pfx) then Make_Build_In_Place_Call_In_Anonymous_Context (Pfx); diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 6ca2c8c..8dbd349 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -1536,7 +1536,7 @@ package body Exp_Ch5 is -- about complications that would other arise from X'Priority'Access, -- which is illegal, because of the lack of aliasing. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then declare Call : Node_Id; Conctyp : Entity_Id; @@ -1865,7 +1865,7 @@ package body Exp_Ch5 is -- build-in-place for user-written assignment statements (the assignment -- here came from an aggregate.) - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Rhs) then Make_Build_In_Place_Call_In_Assignment (N, Rhs); diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index c439a91..37df0d5 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -1465,7 +1465,7 @@ package body Exp_Ch6 is -- functions that are treated as build-in-place to include other -- composite result types. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Actual) then Make_Build_In_Place_Call_In_Anonymous_Context (Actual); @@ -2027,7 +2027,7 @@ package body Exp_Ch6 is -- a conditional or timed select. Check whether the procedure call -- is a renaming of an entry and rewrite it as an entry call. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (N) = N_Procedure_Call_Statement and then ((Nkind (Parent (N)) = N_Triggering_Alternative @@ -2364,7 +2364,7 @@ package body Exp_Ch6 is -- access parameter as an actual. Also, we currently don't enforce -- this check for expander-generated actuals and when -gnatdj is set. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then -- Ada 2005 (AI-231): Check null-excluding access types. Note that -- the intent of 6.4.1(13) is that null-exclusion checks should @@ -2382,7 +2382,7 @@ package body Exp_Ch6 is Install_Null_Excluding_Check (Prev); end if; - -- Ada_Version < Ada_05 + -- Ada_Version < Ada_2005 else if Ekind (Etype (Formal)) /= E_Anonymous_Access_Type @@ -5751,7 +5751,7 @@ package body Exp_Ch6 is if not Comes_From_Extended_Return_Statement (N) and then Is_Immutably_Limited_Type (Etype (Expression (N))) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then not Debug_Flag_Dot_L then declare @@ -6049,7 +6049,7 @@ package body Exp_Ch6 is -- Note: accessibility check is skipped in the VM case, since there -- does not seem to be any practical way to implement this check. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Tagged_Type_Expansion and then Is_Class_Wide_Type (R_Type) and then not Scope_Suppress (Accessibility_Check) @@ -6268,7 +6268,7 @@ package body Exp_Ch6 is -- and the type of the returned object is an interface then generate an -- implicit conversion to force displacement of the "this" pointer. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Comes_From_Extended_Return_Statement (N) and then Nkind (Expression (N)) = N_Identifier and then Is_Interface (Utyp) @@ -6319,7 +6319,7 @@ package body Exp_Ch6 is else return Is_Immutably_Limited_Type (Etype (E)) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then not Debug_Flag_Dot_L; end if; diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb index 39c0fc6..fa63e29 100644 --- a/gcc/ada/exp_ch8.adb +++ b/gcc/ada/exp_ch8.adb @@ -271,7 +271,7 @@ package body Exp_Ch8 is -- eventually we plan to expand the functions that are treated as -- build-in-place to include other composite result types. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Nam) then Make_Build_In_Place_Call_In_Anonymous_Context (Nam); diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 90853ea..62c6c78 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -1061,7 +1061,7 @@ package body Exp_Ch9 is Make_Component_List (Loc, Component_Items => Cdecls), Tagged_Present => - Ada_Version >= Ada_05 and then Is_Tagged_Type (Ctyp), + Ada_Version >= Ada_2005 and then Is_Tagged_Type (Ctyp), Interface_List => Interface_List (N), Limited_Present => True)); end Build_Corresponding_Record; @@ -3461,7 +3461,7 @@ package body Exp_Ch9 is if Nkind (Concval) = N_Function_Call and then Is_Task_Type (Conctyp) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then declare ExpR : constant Node_Id := Relocate_Node (Concval); @@ -3582,7 +3582,7 @@ package body Exp_Ch9 is else -- Interface class-wide formal - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Etype (Formal)) = E_Class_Wide_Type and then Is_Interface (Etype (Formal)) then @@ -5066,7 +5066,7 @@ package body Exp_Ch9 is -- A task interface class-wide type object is being aborted. -- Retrieve its _task_id by calling a dispatching routine. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Etype (Tasknm)) = E_Class_Wide_Type and then Is_Interface (Etype (Tasknm)) and then Is_Task_Interface (Etype (Tasknm)) @@ -5659,7 +5659,7 @@ package body Exp_Ch9 is -- trigger which was expanded into a procedure call. if Nkind (Ecall) = N_Procedure_Call_Statement then - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then (No (Original_Node (Ecall)) or else not Nkind_In (Original_Node (Ecall), @@ -6592,7 +6592,7 @@ package body Exp_Ch9 is S : Entity_Id; -- Primitive operation slot begin - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Blk) = N_Procedure_Call_Statement then Extract_Dispatching_Call (Blk, Call_Ent, Obj, Actuals, Formals); @@ -7383,7 +7383,7 @@ package body Exp_Ch9 is -- this subprogram if the protected type implements an -- interface. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Interfaces (Corresponding_Record_Type (Pid))) then @@ -7466,7 +7466,7 @@ package body Exp_Ch9 is -- protected body. At this point all wrapper specs have been created, -- frozen and included in the dispatch table for the protected type. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Build_Wrapper_Bodies (Loc, Pid, Current_Node); end if; end Expand_N_Protected_Body; @@ -7773,7 +7773,7 @@ package body Exp_Ch9 is -- Type has explicit entries or generated primitive entry wrappers elsif Has_Entries (Prot_Typ) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then Present (Interface_List (N))) then case Corresponding_Runtime_Package (Prot_Typ) is @@ -7944,7 +7944,7 @@ package body Exp_Ch9 is -- the corresponding record is frozen. If any wrappers are generated, -- Current_Node is updated accordingly. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Build_Wrapper_Specs (Loc, Prot_Typ, Current_Node); end if; @@ -8005,7 +8005,7 @@ package body Exp_Ch9 is -- Generate an overriding primitive operation specification for -- this subprogram if the protected type implements an interface. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Interfaces (Corresponding_Record_Type (Prot_Typ))) then @@ -10120,7 +10120,7 @@ package body Exp_Ch9 is -- the task body. At this point all wrapper specs have been created, -- frozen and included in the dispatch table for the task type. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then if Nkind (Parent (N)) = N_Subunit then Insert_Nod := Corresponding_Stub (Parent (N)); else @@ -10571,7 +10571,7 @@ package body Exp_Ch9 is -- Ada 2005 (AI-345): Construct the primitive entry wrapper specs before -- the corresponding record has been frozen. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Build_Wrapper_Specs (Loc, Tasktyp, Rec_Decl); end if; @@ -10770,7 +10770,7 @@ package body Exp_Ch9 is end if; Is_Disp_Select := - Ada_Version >= Ada_05 + Ada_Version >= Ada_2005 and then Nkind (E_Call) = N_Procedure_Call_Statement; if Is_Disp_Select then @@ -11461,7 +11461,7 @@ package body Exp_Ch9 is S := Scope (E); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then while Is_Internal (S) loop if Nkind (Parent (S)) = N_Block_Statement and then @@ -11694,7 +11694,7 @@ package body Exp_Ch9 is elsif Has_Entries (Conc_Typ) or else - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then Present (Interface_List (Parent (Conc_Typ)))) then case Corresponding_Runtime_Package (Conc_Typ) is diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index d783cda..3a0682f 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -604,7 +604,7 @@ package body Exp_Disp is elsif TSS_Name = TSS_Deep_Finalize then return Uint_10; - elsif Ada_Version >= Ada_05 then + elsif Ada_Version >= Ada_2005 then if Chars (E) = Name_uDisp_Asynchronous_Select then return Uint_11; @@ -1971,7 +1971,7 @@ package body Exp_Disp is function Is_Predefined_Interface_Primitive (E : Entity_Id) return Boolean is begin - return Ada_Version >= Ada_05 + return Ada_Version >= Ada_2005 and then (Chars (E) = Name_uDisp_Asynchronous_Select or else Chars (E) = Name_uDisp_Conditional_Select or else Chars (E) = Name_uDisp_Get_Prim_Op_Kind or else @@ -5220,7 +5220,7 @@ package body Exp_Disp is -- constrained by the number of non-predefined primitive operations. if RTE_Record_Component_Available (RE_SSD) then - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Has_DT (Typ) and then Is_Concurrent_Record_Type (Typ) and then Has_Interfaces (Typ) @@ -6030,7 +6030,7 @@ package body Exp_Disp is -- a limited interface. Skip this step in Ravenscar profile or when -- general dispatching is forbidden. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Concurrent_Record_Type (Typ) and then Has_Interfaces (Typ) and then not Restriction_Active (No_Dispatching_Calls) diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb index 25bce02..78d9b00 100644 --- a/gcc/ada/exp_imgv.adb +++ b/gcc/ada/exp_imgv.adb @@ -310,7 +310,7 @@ package body Exp_Imgv is -- soft hyphen correctly, based on the version of Ada in use (ugly!) elsif Rtyp = Standard_Character then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Imid := RE_Image_Character; else Imid := RE_Image_Character_05; @@ -485,7 +485,7 @@ package body Exp_Imgv is elsif Rtyp = Standard_Wide_Character then Append_To (Arg_List, - New_Reference_To (Boolean_Literals (Ada_Version >= Ada_05), Loc)); + New_Reference_To (Boolean_Literals (Ada_Version >= Ada_2005), Loc)); end if; -- Now append the procedure call to the insert list diff --git a/gcc/ada/exp_strm.adb b/gcc/ada/exp_strm.adb index ddb1064..fc7a5a2 100644 --- a/gcc/ada/exp_strm.adb +++ b/gcc/ada/exp_strm.adb @@ -1177,7 +1177,7 @@ package body Exp_Strm is Set_No_Initialization (Obj_Decl); end if; - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Stms := New_List ( Make_Extended_Return_Statement (Loc, Return_Object_Declarations => New_List (Obj_Decl), diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 6d948f1..fc2bb69 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -5032,7 +5032,7 @@ package body Exp_Util is if Nkind (Exp) = N_Function_Call and then Is_Immutably_Limited_Type (Etype (Exp)) and then Nkind (Parent (Exp)) /= N_Object_Declaration - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then declare Obj : constant Entity_Id := Make_Temporary (Loc, 'F', Exp); diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 91def2d..b21ee15 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1577,7 +1577,7 @@ package body Freeze is -- either a tagged type, or a limited record. if Is_Limited_Type (Rec_Type) - and then (Ada_Version < Ada_05 or else Is_Tagged_Type (Rec_Type)) + and then (Ada_Version < Ada_2005 or else Is_Tagged_Type (Rec_Type)) then return; @@ -3829,12 +3829,12 @@ package body Freeze is -- error in Ada 2005 if there is no pool (see AI-366). if Is_Pure_Unit_Access_Type (E) - and then (Ada_Version < Ada_05 + and then (Ada_Version < Ada_2005 or else not No_Pool_Assigned (E)) then Error_Msg_N ("named access type not allowed in pure unit", E); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("\would be legal if Storage_Size of 0 given?", E); diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb index b2d9349..766c950 100644 --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -609,7 +609,7 @@ package body Impunit is for J in Non_Imp_File_Names_05'Range loop if Name_Buffer (1 .. 8) = Non_Imp_File_Names_05 (J) then - return Ada_05_Unit; + return Ada_2005_Unit; end if; end loop; diff --git a/gcc/ada/impunit.ads b/gcc/ada/impunit.ads index 27b6e6e..621a034 100644 --- a/gcc/ada/impunit.ads +++ b/gcc/ada/impunit.ads @@ -48,7 +48,7 @@ package Impunit is -- in both Ada 95 mode and Ada 05 mode. Note that in Ada 83 mode, no -- child units are allowed, so you can't even name such a unit. - Ada_05_Unit, + Ada_2005_Unit, -- This unit is defined in the Ada 2005 RM. Withing this unit from a -- Ada 95 mode program will generate a warning (again, strictly speaking -- this should be an error, but that seems over-strenuous). diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 0fd2f35..8fc8108 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -468,7 +468,7 @@ package body Lib.Xref is if Comes_From_Source (N) and then Is_Ada_2005_Only (E) - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 and then Warn_On_Ada_2005_Compatibility and then (Typ = 'm' or else Typ = 'r') then diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 9adc839..3c9f632 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -64,15 +64,14 @@ package Opt is -- GNATBIND, GNATLINK -- Set True if binder file to be generated in Ada rather than C - type Ada_Version_Type is (Ada_83, Ada_95, Ada_05, Ada_2012); + type Ada_Version_Type is (Ada_83, Ada_95, Ada_2005, Ada_2012); pragma Ordered (Ada_Version_Type); -- Versions of Ada for Ada_Version below. Note that these are ordered, -- so that tests like Ada_Version >= Ada_95 are legitimate and useful. + -- Think twice before using "="; Ada_Version >= Ada_2012 is more likely + -- what you want, because it will apply to future versions of the language. - Ada_2005 : Ada_Version_Type renames Ada_05; - -- Renaming with full name (preferred usage) - - Ada_Version_Default : constant Ada_Version_Type := Ada_05; + Ada_Version_Default : constant Ada_Version_Type := Ada_2005; pragma Warnings (Off, Ada_Version_Default); -- GNAT -- Default Ada version if no switch given. The Warnings off is to kill diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb index e59a8c0..1b43e1d 100644 --- a/gcc/ada/par-ch10.adb +++ b/gcc/ada/par-ch10.adb @@ -841,7 +841,7 @@ package body Ch10 is ("unexpected LIMITED ignored"); end if; - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("LIMITED WITH is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); @@ -860,7 +860,7 @@ package body Ch10 is Restore_Scan_State (Scan_State); -- to PRIVATE return Item_List; - elsif Ada_Version < Ada_05 then + elsif Ada_Version < Ada_2005 then Error_Msg_SP ("`PRIVATE WITH` is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); diff --git a/gcc/ada/par-ch11.adb b/gcc/ada/par-ch11.adb index 6288723..b0b0842 100644 --- a/gcc/ada/par-ch11.adb +++ b/gcc/ada/par-ch11.adb @@ -198,7 +198,7 @@ package body Ch11 is end if; if Token = Tok_With then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SC ("string expression in raise is Ada 2005 extension"); Error_Msg_SC ("\unit must be compiled with -gnat05 switch"); end if; diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb index 642c05a..71d8367 100644 --- a/gcc/ada/par-ch12.adb +++ b/gcc/ada/par-ch12.adb @@ -335,7 +335,7 @@ package body Ch12 is -- Ada2005: an association can be given by: others => <> if Token = Tok_Others then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("partial parametrization of formal packages" & " is an Ada 2005 extension"); @@ -463,7 +463,7 @@ package body Ch12 is Set_Access_Definition (Decl_Node, P_Access_Definition (Not_Null_Present)); - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("access definition not allowed in formal object " & "declaration"); @@ -856,7 +856,7 @@ package body Ch12 is Set_Limited_Present (Def_Node); Scan; -- past LIMITED - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("LIMITED in derived type is an Ada 2005 extension"); Error_Msg_SP @@ -867,7 +867,7 @@ package body Ch12 is Set_Synchronized_Present (Def_Node); Scan; -- past SYNCHRONIZED - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("SYNCHRONIZED in derived type is an Ada 2005 extension"); Error_Msg_SP @@ -888,7 +888,7 @@ package body Ch12 is if Token = Tok_And then Scan; -- past AND - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("abstract interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); @@ -1108,7 +1108,7 @@ package body Ch12 is New_Node (N_Formal_Abstract_Subprogram_Declaration, Prev_Sloc); Scan; -- past ABSTRACT - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("formal abstract subprograms are an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); @@ -1130,7 +1130,7 @@ package body Ch12 is T_Semicolon; elsif Token = Tok_Null then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("null default subprograms are an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); diff --git a/gcc/ada/par-ch2.adb b/gcc/ada/par-ch2.adb index f0a0bce..4892c8c 100644 --- a/gcc/ada/par-ch2.adb +++ b/gcc/ada/par-ch2.adb @@ -291,7 +291,7 @@ package body Ch2 is -- Ada 2005 (AI-284): INTERFACE is a new reserved word but it is -- allowed as a pragma name. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Token = Tok_Interface then Prag_Name := Name_Interface; diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 4b95767..30674e2 100644 --- a/gcc/ada/par-ch3.adb +++ b/gcc/ada/par-ch3.adb @@ -433,7 +433,7 @@ package body Ch3 is -- Ada 2005 (AI-419): AARM 3.4 (2/2) - if (Ada_Version < Ada_05 and then Token = Tok_Limited) + if (Ada_Version < Ada_2005 and then Token = Tok_Limited) or else Token = Tok_Private or else Token = Tok_Record or else Token = Tok_Null @@ -566,7 +566,7 @@ package body Ch3 is -- Ada 2005 (AI-326): If the words IS TAGGED appear, the type -- is a tagged incomplete type. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Token = Tok_Semicolon then Scan; -- past ; @@ -703,7 +703,7 @@ package body Ch3 is -- Ada 2005 (AI-419): LIMITED NEW elsif Token = Tok_New then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("LIMITED in derived type is an Ada 2005 extension"); Error_Msg_SP @@ -1018,7 +1018,7 @@ package body Ch3 is -- access ..." is legal in Ada 95, whereas "Formal : not null -- Named_Access_Type" is not. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 or else (Ada_Version >= Ada_95 and then Allow_Anonymous_In_95 and then Token = Tok_Access) @@ -1588,7 +1588,7 @@ package body Ch3 is Set_Null_Exclusion_Present (Decl_Node, Not_Null_Present); if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -1651,7 +1651,7 @@ package body Ch3 is -- Access definition (AI-406) or subtype indication if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -1692,7 +1692,7 @@ package body Ch3 is Not_Null_Present := P_Null_Exclusion; -- Ada 2005 (AI-231/423) if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -1720,7 +1720,7 @@ package body Ch3 is -- Object renaming declaration if Token_Is_Renames then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("`NOT NULL` not allowed in object renaming"); raise Error_Resync; @@ -1763,7 +1763,7 @@ package body Ch3 is -- Ada 2005 (AI-230): Access Definition case elsif Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -1925,7 +1925,7 @@ package body Ch3 is begin Typedef_Node := New_Node (N_Derived_Type_Definition, Token_Ptr); - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then Token = Tok_Identifier and then Token_Name = Name_Interface then @@ -1952,7 +1952,7 @@ package body Ch3 is if Token = Tok_And then Scan; -- past AND - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("abstract interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); @@ -2648,7 +2648,7 @@ package body Ch3 is -- Ada 2005 (AI-230): Access Definition case if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -3416,7 +3416,7 @@ package body Ch3 is -- Ada 2005 (AI-230): Access Definition case if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("generalized use of anonymous access types " & "is an Ada 2005 extension"); @@ -3745,7 +3745,7 @@ package body Ch3 is Typedef_Node : Node_Id; begin - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("abstract interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); end if; @@ -3924,7 +3924,7 @@ package body Ch3 is -- Ada 2005 (AI-318-02) if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SC ("anonymous access result type is an Ada 2005 extension"); Error_Msg_SC ("\unit must be compiled with -gnat05 switch"); @@ -4025,7 +4025,7 @@ package body Ch3 is or else Token = Tok_Procedure or else Token = Tok_Function then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("access-to-subprogram is an Ada 2005 extension"); Error_Msg_SP ("\unit should be compiled with -gnat05 switch"); end if; @@ -4041,7 +4041,7 @@ package body Ch3 is Set_Null_Exclusion_Present (Def_Node, Null_Exclusion_Present); if Token = Tok_All then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("ALL is not permitted for anonymous access types"); end if; @@ -4050,7 +4050,7 @@ package body Ch3 is Set_All_Present (Def_Node); elsif Token = Tok_Constant then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("access-to-constant is an Ada 2005 extension"); Error_Msg_SP ("\unit should be compiled with -gnat05 switch"); end if; diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index 7faa02c..c444d67 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -1484,7 +1484,7 @@ package body Ch4 is -- Ada 2005(AI-287): The box notation is used to indicate the -- default initialization of aggregate components - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("component association with '<'> is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb index 2644269..8252f5c 100644 --- a/gcc/ada/par-ch6.adb +++ b/gcc/ada/par-ch6.adb @@ -218,7 +218,7 @@ package body Ch6 is if Is_Overriding or else Not_Overriding then - -- Note that if we are not in Ada_05 mode, error messages have + -- Note that if we are not in Ada_2005 mode, error messages have -- already been given, so no need to give another message here. -- An overriding indicator is allowed for subprogram declarations, @@ -367,7 +367,7 @@ package body Ch6 is -- Ada 2005 (AI-318-02) if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SC ("anonymous access result type is an Ada 2005 extension"); Error_Msg_SC ("\unit must be compiled with -gnat05 switch"); @@ -531,7 +531,7 @@ package body Ch6 is -- Ada 2005 (AI-248): Parse a null procedure declaration elsif Token = Tok_Null then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("null procedures are an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); end if; @@ -842,7 +842,7 @@ package body Ch6 is -- Ada 2005 (AI-318-02) if Token = Tok_Access then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SC ("anonymous access result type is an Ada 2005 extension"); Error_Msg_SC ("\unit must be compiled with -gnat05 switch"); @@ -1678,7 +1678,7 @@ package body Ch6 is -- Extended_return_statement (Ada 2005 only -- AI-318): else - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP (" extended_return_statement is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); diff --git a/gcc/ada/par-ch9.adb b/gcc/ada/par-ch9.adb index f7a0c7f..a97c463 100644 --- a/gcc/ada/par-ch9.adb +++ b/gcc/ada/par-ch9.adb @@ -168,7 +168,7 @@ package body Ch9 is if Token = Tok_New then Scan; -- past NEW - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("task interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); end if; @@ -480,7 +480,7 @@ package body Ch9 is if Token = Tok_New then Scan; -- past NEW - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("protected interface is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); end if; @@ -640,7 +640,7 @@ package body Ch9 is end if; if Is_Overriding or else Not_Overriding then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("overriding indicator is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); @@ -824,7 +824,7 @@ package body Ch9 is end if; if Is_Overriding or else Not_Overriding then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_SP ("overriding indicator is an Ada 2005 extension"); Error_Msg_SP ("\unit must be compiled with -gnat05 switch"); diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 1c00e39..be94746 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -313,8 +313,8 @@ begin when Pragma_Ada_05 | Pragma_Ada_2005 => if Arg_Count = 0 then - Ada_Version := Ada_05; - Ada_Version_Explicit := Ada_05; + Ada_Version := Ada_2005; + Ada_Version_Explicit := Ada_2005; end if; --------------------- diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb index 5599d83..b74bb1c 100644 --- a/gcc/ada/scng.adb +++ b/gcc/ada/scng.adb @@ -1062,7 +1062,7 @@ package body Scng is -- but in Ada 2005, the set of characters allowed has been -- restricted to graphic characters. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_UTF_32_Non_Graphic (UTF_32 (Code)) then Error_Msg @@ -1690,7 +1690,7 @@ package body Scng is -- literal, but in Ada 2005, the set of characters allowed -- is restricted to graphic characters. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_UTF_32_Non_Graphic (UTF_32 (Code)) then Error_Msg -- CODEFIX???? @@ -2331,7 +2331,7 @@ package body Scng is -- Wide characters are always allowed in Ada 2005 if Identifier_Character_Set /= 'w' - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg ("wide character not allowed in identifier", Wptr); diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index fcbf1df..53b340d 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -921,7 +921,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-287): Limited aggregates allowed - if Is_Limited_Type (Typ) and then Ada_Version < Ada_05 then + if Is_Limited_Type (Typ) and then Ada_Version < Ada_2005 then Error_Msg_N ("aggregate type cannot be limited", N); Explain_Limited_Type (Typ, N); @@ -1758,7 +1758,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Expression (Assoc)) then Check_Can_Never_Be_Null (Etype (N), Expression (Assoc)); @@ -2060,7 +2060,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Expr) then Check_Can_Never_Be_Null (Etype (N), Expr); @@ -2087,7 +2087,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Assoc) then Check_Can_Never_Be_Null (Etype (N), Expression (Assoc)); @@ -2355,7 +2355,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-287): Limited aggregates are allowed - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("aggregate type cannot be limited", N); Explain_Limited_Type (Typ, N); return; @@ -2395,7 +2395,7 @@ package body Sem_Aggr is -- Only consider limited interpretations in the Ada 2005 case if Is_Tagged_Type (It.Typ) - and then (Ada_Version >= Ada_05 + and then (Ada_Version >= Ada_2005 or else not Is_Limited_Type (It.Typ)) then if A_Type /= Any_Type then @@ -2410,7 +2410,7 @@ package body Sem_Aggr is end loop; if A_Type = Any_Type then - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("ancestor part must be of a tagged type", A); else Error_Msg_N @@ -2809,7 +2809,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Expression (Assoc)) then Check_Can_Never_Be_Null (Compon, Expression (Assoc)); @@ -3051,7 +3051,7 @@ package body Sem_Aggr is -- aggregate for a null record type was established by AI05-016. elsif No (First_Entity (Typ)) - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg_N ("record aggregate must be null", N); return; @@ -3148,7 +3148,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Positional_Expr) then Check_Can_Never_Be_Null (Discrim, Positional_Expr); @@ -3431,7 +3431,7 @@ package body Sem_Aggr is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Known_Null (Positional_Expr) then Check_Can_Never_Be_Null (Component, Positional_Expr); @@ -4013,7 +4013,7 @@ package body Sem_Aggr is begin pragma Assert - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then Present (Expr) and then Known_Null (Expr)); diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 8d052c0..b6cb8a4 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -730,7 +730,7 @@ package body Sem_Attr is -- expression comes from source, e.g. when a single component -- association in an aggregate has a box association. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then OK_Self_Reference then null; @@ -1349,7 +1349,7 @@ package body Sem_Attr is -- S : constant Integer := X.all'Size; -- ERROR -- procedure Q (Obj : Integer := X.all'Alignment); -- ERROR - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (P) = N_Explicit_Dereference then E := P; @@ -1671,7 +1671,7 @@ package body Sem_Attr is if Is_Task_Type (Etype (P)) or else (Is_Access_Type (Etype (P)) and then Is_Task_Type (Designated_Type (Etype (P)))) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then Ekind (Etype (P)) = E_Class_Wide_Type and then Is_Interface (Etype (P)) and then Is_Task_Interface (Etype (P))) @@ -1679,7 +1679,7 @@ package body Sem_Attr is Resolve (P); else - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Attr_P ("prefix of % attribute must be a task or a task " & "interface class-wide object"); @@ -1979,7 +1979,7 @@ package body Sem_Attr is -- Ada 2005 (AI-345): Ensure that the compiler gives exactly the current -- output compiling in Ada 95 mode for the case of ambiguous prefixes. - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then Is_Overloaded (P) and then Aname /= Name_Access and then Aname /= Name_Address @@ -1990,7 +1990,7 @@ package body Sem_Attr is then Error_Attr ("ambiguous prefix for % attribute", P); - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Overloaded (P) and then Aname /= Name_Access and then Aname /= Name_Address @@ -2002,7 +2002,7 @@ package body Sem_Attr is -- entry wrappers, the attributes Count, Caller and AST_Entry require -- a context check - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then (Aname = Name_Count or else Aname = Name_Caller or else Aname = Name_AST_Entry) @@ -2832,7 +2832,7 @@ package body Sem_Attr is -- Ada 2005 (AI-345): Do not consider primitive entry -- wrappers generated for task or protected types. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then not Comes_From_Source (It.Nam) then null; @@ -3175,7 +3175,7 @@ package body Sem_Attr is elsif Is_Task_Type (Etype (P)) or else (Is_Access_Type (Etype (P)) and then Is_Task_Type (Designated_Type (Etype (P)))) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then Ekind (Etype (P)) = E_Class_Wide_Type and then Is_Interface (Etype (P)) and then Is_Task_Interface (Etype (P))) @@ -3184,7 +3184,7 @@ package body Sem_Attr is Set_Etype (N, RTE (RO_AT_Task_Id)); else - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Attr_P ("prefix of % attribute must be an exception, a " & "task or a task interface class-wide object"); @@ -3829,7 +3829,7 @@ package body Sem_Attr is -- Ada 2005 (AI-327): Dynamic ceiling priorities when Attribute_Priority => - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Attr ("% attribute is allowed only in Ada 2005 mode", P); end if; @@ -7450,7 +7450,7 @@ package body Sem_Attr is -- Special case of soft hyphen in Ada 2005 if C = Character'Val (16#AD#) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then Wt := 11; else @@ -8126,7 +8126,7 @@ package body Sem_Attr is Des_Btyp := Designated_Type (Btyp); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Incomplete_Type (Des_Btyp) then -- Ada 2005 (AI-412): If the (sub)type is a limited view of an @@ -8155,7 +8155,7 @@ package body Sem_Attr is -- components, and return objects. For a component definition -- the level is the same of the enclosing composite type. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Local_Anonymous_Access (Btyp) and then Object_Access_Level (P) > Type_Access_Level (Btyp) and then Attr_Id = Attribute_Access @@ -8262,7 +8262,7 @@ package body Sem_Attr is elsif Has_Discriminants (Designated_Type (Typ)) and then not Is_Constrained (Des_Btyp) and then - (Ada_Version < Ada_05 + (Ada_Version < Ada_2005 or else not Has_Constrained_Partial_View (Designated_Type (Base_Type (Typ)))) @@ -8857,13 +8857,13 @@ package body Sem_Attr is -- In Ada 2005, Input can invoke Read, and Output can invoke Write if Nam = TSS_Stream_Input - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then Stream_Attribute_Available (Etyp, TSS_Stream_Read) then return True; elsif Nam = TSS_Stream_Output - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then Stream_Attribute_Available (Etyp, TSS_Stream_Write) then return True; @@ -8880,7 +8880,7 @@ package body Sem_Attr is end if; end loop; - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then -- In Ada 95 mode, also consider a non-visible definition diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index 0bae96d..2509d12 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -398,7 +398,7 @@ package body Sem_Cat is -- currently visible. return Present (Rep_Item) - and then (Ada_Version < Ada_05 + and then (Ada_Version < Ada_2005 or else At_Any_Place or else not Is_Hidden (Entity (Rep_Item))); end Has_Stream_Attribute_Definition; @@ -779,7 +779,7 @@ package body Sem_Cat is -- This test is skipped in Ada 2005 (see AI-366) - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then Comes_From_Source (T) and then In_Pure_Unit and then not In_Subprogram_Task_Protected_Unit @@ -976,7 +976,7 @@ package body Sem_Cat is -- Don't need this check in Ada 2005 mode, where this is all taken -- care of by the mechanism for Preelaborable Initialization. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then return; end if; @@ -1157,7 +1157,7 @@ package body Sem_Cat is -- marked with this pragma in the predefined library are -- not treated specially. - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("private object not allowed in preelaborated unit", N); @@ -1190,7 +1190,7 @@ package body Sem_Cat is then Error_Msg_Sloc := Sloc (Ent); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_NE ("\would be legal if pragma Preelaborable_" & "Initialization given for & #", N, Ent); @@ -1609,7 +1609,7 @@ package body Sem_Cat is Base_Under_Type := Base_Type (Underlying_Type (Base_Param_Type)); - if (Ada_Version < Ada_05 + if (Ada_Version < Ada_2005 and then (No (TSS (Base_Param_Type, TSS_Stream_Read)) or else @@ -1619,7 +1619,7 @@ package body Sem_Cat is or else No (TSS (Base_Under_Type, TSS_Stream_Write)))) or else - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then (No (TSS (Base_Param_Type, TSS_Stream_Read)) or else @@ -1639,7 +1639,7 @@ package body Sem_Cat is Error_Node := Param_Spec; end if; - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("limited parameter in 'R'C'I unit " & "must have visible read/write attributes ", @@ -2003,7 +2003,7 @@ package body Sem_Cat is "non-remote access type", U_Typ); end if; - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("\must have visible Read and Write attribute " & "definition clauses (RM E.2.2(8))", U_Typ); diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 105f856..3c9edd1 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -2452,8 +2452,8 @@ package body Sem_Ch10 is "and version-dependent?", Name (N)); end if; - elsif U_Kind = Ada_05_Unit - and then Ada_Version < Ada_05 + elsif U_Kind = Ada_2005_Unit + and then Ada_Version < Ada_2005 and then Warn_On_Ada_2005_Compatibility then Error_Msg_N ("& is an Ada 2005 unit?", Name (N)); @@ -3773,7 +3773,7 @@ package body Sem_Ch10 is -- looking for incomplete subtype declarations of incomplete types -- visible through a limited with clause. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Analyzed (N) and then Nkind (Unit (N)) = N_Package_Declaration then @@ -5026,7 +5026,7 @@ package body Sem_Ch10 is if Is_Child_Unit (Uname) and then Is_Visible_Child_Unit (Uname) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then declare Decl1 : constant Node_Id := Unit_Declaration_Node (P); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 956c640..8b636d4 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1867,7 +1867,7 @@ package body Sem_Ch12 is -- Ada 2005 (AI-287): Limited aggregates allowed in generic formals - if Ada_Version < Ada_05 and then Is_Limited_Type (T) then + if Ada_Version < Ada_2005 and then Is_Limited_Type (T) then Error_Msg_N ("generic formal of mode IN must not be of limited type", N); Explain_Limited_Type (T, N); @@ -4235,7 +4235,7 @@ package body Sem_Ch12 is end if; if Is_Dispatching_Operation (Act_Decl_Id) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then declare Formal : Entity_Id; @@ -4467,7 +4467,7 @@ package body Sem_Ch12 is procedure Check_Access_Definition (N : Node_Id) is begin pragma Assert - (Ada_Version >= Ada_05 + (Ada_Version >= Ada_2005 and then Present (Access_Definition (N))); null; end Check_Access_Definition; @@ -8380,7 +8380,7 @@ package body Sem_Ch12 is -- the type of the actual shall resolve to a specific anonymous -- access type. - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 or else Ekind (Base_Type (Ftyp)) /= E_Anonymous_Access_Type @@ -8558,7 +8558,7 @@ package body Sem_Ch12 is -- Otherwise, the subtype of the actual matching the formal object -- declaration shall exclude null. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Actual_Decl) and then Nkind_In (Actual_Decl, N_Formal_Object_Declaration, @@ -9577,7 +9577,7 @@ package body Sem_Ch12 is -- Ada 2005 (AI-251) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Interface (Ancestor) then if not Interface_Present_In_Ancestor (Act_T, Ancestor) then @@ -9597,7 +9597,7 @@ package body Sem_Ch12 is -- that the formal type declaration has been rewritten as a private -- extension. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Parent (A_Gen_T)) = N_Private_Extension_Declaration and then Synchronized_Present (Parent (A_Gen_T)) then diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 6a4d514..624684b 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2404,7 +2404,7 @@ package body Sem_Ch13 is -- also used to locate primitives covering interfaces when processing -- generics (see Derive_Subprograms). - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (E) = E_Record_Type and then Is_Tagged_Type (E) and then not Is_Interface (E) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 5fb13e6..3320c14 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -780,7 +780,7 @@ package body Sem_Ch3 is (E_Anonymous_Access_Type, Related_Nod, Scope_Id => Anon_Scope); if All_Present (N) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then Error_Msg_N ("ALL is not permitted for anonymous access types", N); end if; @@ -833,7 +833,7 @@ package body Sem_Ch3 is -- from Ada 95 semantics. In Ada 2005, anonymous access must specify if -- the null value is allowed. In Ada 95 the null value is never allowed. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Set_Can_Never_Be_Null (Anon_Type, Null_Exclusion_Present (N)); else Set_Can_Never_Be_Null (Anon_Type, True); @@ -1513,7 +1513,7 @@ package body Sem_Ch3 is Restore_Scope : Boolean := False; begin - pragma Assert (Ada_Version >= Ada_05 + pragma Assert (Ada_Version >= Ada_2005 and then Is_Record_Type (Tagged_Type) and then Is_Tagged_Type (Tagged_Type) and then Has_Interfaces (Tagged_Type) @@ -1776,7 +1776,7 @@ package body Sem_Ch3 is Preanalyze_Spec_Expression (E, T); Check_Initialization (T, E); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (T) = E_Anonymous_Access_Type and then Etype (E) /= Any_Type then @@ -1867,7 +1867,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-231): Propagate the null-excluding attribute and carry -- out some static checks. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Can_Never_Be_Null (T) then Null_Exclusion_Static_Checks (N); @@ -2489,7 +2489,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-231): Propagate the null-excluding attribute and carry -- out some static checks - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Can_Never_Be_Null (T) then -- In case of aggregates we must also take care of the correct @@ -2589,7 +2589,7 @@ package body Sem_Ch3 is -- to make handlers not at the library level illegal. if Has_Interrupt_Handler (T) - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg_N ("interrupt object can only be declared at library level", Id); @@ -2970,7 +2970,7 @@ package body Sem_Ch3 is and then Is_Record_Type (T) and then not Is_Constrained (T) and then Has_Discriminants (T) - and then (Ada_Version < Ada_05 or else Is_Indefinite_Subtype (T)) + and then (Ada_Version < Ada_2005 or else Is_Indefinite_Subtype (T)) then Set_Actual_Subtype (Id, Build_Default_Subtype (T, N)); end if; @@ -3322,7 +3322,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-443): Synchronized private extension or a rewritten -- synchronized formal derived type. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Synchronized_Present (N) then Set_Is_Limited_Record (T); @@ -3674,7 +3674,7 @@ package body Sem_Ch3 is end if; when E_Incomplete_Type => - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Set_Ekind (Id, E_Incomplete_Subtype); -- Ada 2005 (AI-412): Decorate an incomplete subtype @@ -4462,7 +4462,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-231): Propagate the null-excluding attribute to the -- array type to ensure that objects of this type are initialized. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Can_Never_Be_Null (Element_Type) then Set_Can_Never_Be_Null (T); @@ -6650,7 +6650,7 @@ package body Sem_Ch3 is -- Create internal access types for components with anonymous -- access types. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Check_Anonymous_Access_Components (N, Derived_Type, Derived_Type, Component_List (Record_Extension_Part (Type_Def))); @@ -6875,7 +6875,7 @@ package body Sem_Ch3 is -- cannot be declared in a generic body if it's derived directly -- or indirectly from a formal type of that generic. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then if Present (Enclosing_Generic_Body (Derived_Type)) then declare Ancestor_Type : Entity_Id; @@ -6948,7 +6948,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-251) - if Ada_Version >= Ada_05 and then Is_Tagged then + if Ada_Version >= Ada_2005 and then Is_Tagged then -- "The declaration of a specific descendant of an interface type -- freezes the interface type" (RM 13.14). @@ -7312,7 +7312,7 @@ package body Sem_Ch3 is (Derived_Type, Expand_To_Stored_Constraint (Parent_Base, Discs)); end if; - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then declare Ifaces_List : Elist_Id; @@ -8162,7 +8162,7 @@ package body Sem_Ch3 is -- concurrent record type (which has the list of primitive -- operations). - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Concurrent_Type (T) then Set_Corresponding_Record_Type (Def_Id, @@ -8557,7 +8557,7 @@ package body Sem_Ch3 is if Is_Null_Extension (T) and then Has_Controlling_Result (Subp) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then Present (Alias_Subp) and then not Comes_From_Source (Subp) and then not Is_Abstract_Subprogram (Alias_Subp) @@ -8613,7 +8613,7 @@ package body Sem_Ch3 is if Nkind (Type_Def) = N_Derived_Type_Definition and then Present (Record_Extension_Part (Type_Def)) and then - (Ada_Version < Ada_05 + (Ada_Version < Ada_2005 or else not Is_Null_Extension (T) or else Ekind (Subp) = E_Procedure or else not Has_Controlling_Result (Subp) @@ -8837,7 +8837,7 @@ package body Sem_Ch3 is and then Has_Discriminants (Etype (C)) and then not Is_Constrained (Etype (C)) and then not In_Instance_Body - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg_N ("aliased component must be constrained (RM 3.6(11))", @@ -8852,7 +8852,7 @@ package body Sem_Ch3 is and then Has_Discriminants (Component_Type (T)) and then not Is_Constrained (Component_Type (T)) and then not In_Instance_Body - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg_N ("aliased component type must be constrained (RM 3.6(11))", @@ -9201,7 +9201,7 @@ package body Sem_Ch3 is Error_Msg_N ("?cannot initialize entities of limited type!", Exp); - elsif Ada_Version < Ada_05 then + elsif Ada_Version < Ada_2005 then Error_Msg_N ("cannot initialize entities of limited type", Exp); Explain_Limited_Type (T, Exp); @@ -9515,7 +9515,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-230): Access discriminant allowed in -- non-limited record types. - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then -- This restriction gets applied to the full type here. It -- has already been applied earlier to the partial view. @@ -10071,7 +10071,7 @@ package body Sem_Ch3 is end if; if (Ekind (T) = E_General_Access_Type - or else Ada_Version >= Ada_05) + or else Ada_Version >= Ada_2005) and then Has_Private_Declaration (Desig_Type) and then In_Open_Scopes (Scope (Desig_Type)) and then Has_Discriminants (Desig_Type) @@ -10175,11 +10175,11 @@ package body Sem_Ch3 is -- generic body, the rule is checked assuming that the actual type has -- defaulted discriminants. - if Ada_Version >= Ada_05 or else Warn_On_Ada_2005_Compatibility then + if Ada_Version >= Ada_2005 or else Warn_On_Ada_2005_Compatibility then if Ekind (Base_Type (T)) = E_General_Access_Type and then Has_Defaulted_Discriminants (Desig_Type) then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("access subtype of general access type would not " & "be allowed in Ada 2005?", S); @@ -10195,7 +10195,7 @@ package body Sem_Ch3 is and then Has_Discriminants (Desig_Type) and then In_Package_Body (Current_Scope) then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("access subtype would not be allowed in generic body " & "in Ada 2005?", S); @@ -10968,7 +10968,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-412): Constrained incomplete subtypes are illegal. -- Avoid generating an error for access-to-incomplete subtypes. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (T) = E_Incomplete_Type and then Nkind (Parent (S)) = N_Subtype_Declaration and then not Is_Itype (Def_Id) @@ -12101,7 +12101,7 @@ package body Sem_Ch3 is Typ : Entity_Id; begin - pragma Assert (Ada_Version >= Ada_05 + pragma Assert (Ada_Version >= Ada_2005 and then Is_Record_Type (Tagged_Type) and then Is_Tagged_Type (Tagged_Type) and then Has_Interfaces (Tagged_Type)); @@ -12491,7 +12491,7 @@ package body Sem_Ch3 is -- overrides an interface primitive because interface primitives -- must be visible in the partial view of the parent (RM 7.3 (7.3/2)) - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Dispatching_Operation (Parent_Subp) and then Covers_Some_Interface (Parent_Subp) then @@ -12634,7 +12634,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-228): Calculate the "require overriding" and "abstract" -- properties of the subprogram, as defined in RM-3.9.3(4/2-6/2). - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then (Is_Abstract_Subprogram (Alias (New_Subp)) or else (Is_Tagged_Type (Derived_Type) and then Etype (New_Subp) = Derived_Type @@ -12656,7 +12656,7 @@ package body Sem_Ch3 is Set_Requires_Overriding (New_Subp); end if; - elsif Ada_Version < Ada_05 + elsif Ada_Version < Ada_2005 and then (Is_Abstract_Subprogram (Alias (New_Subp)) or else (Is_Tagged_Type (Derived_Type) and then Etype (New_Subp) = Derived_Type @@ -13695,7 +13695,7 @@ package body Sem_Ch3 is -- extension. There is no point in checking the ancestor type or -- the progenitors since the construct is wrong to begin with. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Generic_Type (T) and then Present (Original_Node (N)) then @@ -15845,7 +15845,7 @@ package body Sem_Ch3 is is begin return Is_CPP_Constructor_Call (Exp) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then not Debug_Flag_Dot_L and then OK_For_Limited_Init_In_05 (Typ, Exp)); end OK_For_Limited_Init; @@ -16146,7 +16146,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-230): Access discriminant allowed in non-limited -- record types - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Check_Access_Discriminant_Requires_Limited (Discr, Discriminant_Type (Discr)); end if; @@ -16208,7 +16208,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-231): Create an Itype that is a duplicate of -- Discr_Type but with the null-exclusion attribute - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then -- Ada 2005 (AI-231): Static checks @@ -16496,7 +16496,7 @@ package body Sem_Ch3 is -- consistent. We omit this check for synchronized types because -- they are performed on the corresponding record type when frozen. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Tagged_Type (Priv_T) and then Is_Tagged_Type (Full_T) and then not Is_Concurrent_Type (Full_T) @@ -16696,7 +16696,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-443): A synchronized private extension must be -- completed by a task or protected type. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Parent (Priv_T)) = N_Private_Extension_Declaration and then Synchronized_Present (Parent (Priv_T)) and then not Is_Concurrent_Type (Full_T) @@ -17366,7 +17366,7 @@ package body Sem_Ch3 is if Ekind (Root_Type (Entity (T))) = E_Incomplete_Type and then - not (Ada_Version >= Ada_05 + not (Ada_Version >= Ada_2005 and then (Nkind (Parent (T)) = N_Subtype_Declaration or else @@ -17390,7 +17390,7 @@ package body Sem_Ch3 is -- Ada 2005 (AI-231): Static check - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (P) and then Null_Exclusion_Present (P) and then Nkind (P) /= N_Access_To_Object_Definition @@ -18090,7 +18090,7 @@ package body Sem_Ch3 is -- Normal case - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 or else not Interface_Present (Def) then -- The flag Is_Tagged_Type might have already been set by @@ -18129,7 +18129,7 @@ package body Sem_Ch3 is Check_Anonymous_Access_Components (N, T, Prev, Component_List (Def)); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Interface_List (Def)) then Check_Interfaces (N, Def); diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 76516e3..2d6feb2 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -511,7 +511,7 @@ package body Sem_Ch4 is -- partial view, it cannot receive a discriminant constraint, -- and the allocated object is unconstrained. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Has_Constrained_Partial_View (Base_Typ) then Error_Msg_N @@ -597,7 +597,7 @@ package body Sem_Ch4 is Error_Msg_N ("initialization required in class-wide allocation", N); else - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then Is_Limited_Type (Type_Id) then Error_Msg_N ("unconstrained allocation not allowed", N); @@ -3767,7 +3767,7 @@ package body Sem_Ch4 is -- Ada 2005 (AI05-0030): In the case of dispatching requeue, the -- selected component should resolve to a name. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Tagged_Type (Prefix_Type) and then not Is_Concurrent_Type (Prefix_Type) then @@ -3818,7 +3818,7 @@ package body Sem_Ch4 is -- Before declaring an error, check whether this is tagged -- private type and a call to a primitive operation. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Tagged_Type (Prefix_Type) and then Try_Object_Operation (N) then @@ -3914,7 +3914,7 @@ package body Sem_Ch4 is -- visible entities are plausible interpretations, check whether -- there is some other primitive operation with that name. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Tagged_Type (Prefix_Type) then if (Etype (N) = Any_Type @@ -4741,7 +4741,7 @@ package body Sem_Ch4 is pragma Warnings (Off, Boolean); begin - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Actual := First_Actual (N); while Present (Actual) loop @@ -5240,7 +5240,7 @@ package body Sem_Ch4 is -- Ada 2005 (AI-230): Keep restriction imposed by Ada 83 and 95: -- Do not allow anonymous access types in equality operators. - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then Ekind (T1) = E_Anonymous_Access_Type then return; @@ -5920,7 +5920,7 @@ package body Sem_Ch4 is -- unit, it is one of the operations declared abstract in some -- variants of System, and it must be removed as well. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 or else Is_Predefined_File_Name (Unit_File_Name (Get_Source_Unit (It.Nam))) then @@ -6080,7 +6080,7 @@ package body Sem_Ch4 is -- predefined operators when addresses are involved since this -- case is handled separately. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then not Address_Kludge then while Present (It.Nam) loop diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 816e12b..5887ea5 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -366,7 +366,7 @@ package body Sem_Ch5 is S : Entity_Id; begin - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then -- Handle chains of renamings @@ -592,7 +592,7 @@ package body Sem_Ch5 is -- as well to anonymous access-to-subprogram types that are component -- subtypes or formal parameters. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Access_Type (T1) then if Is_Local_Anonymous_Access (T1) @@ -605,7 +605,7 @@ package body Sem_Ch5 is -- Ada 2005 (AI-231): Assignment to not null variable - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Can_Never_Be_Null (T1) and then not Assignment_OK (Lhs) then diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 3caa1c2..f6a1d8a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -476,7 +476,7 @@ package body Sem_Ch6 is then -- Error in Ada 2005 - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then not Debug_Flag_Dot_L and then not GNAT_Mode then @@ -733,7 +733,7 @@ package body Sem_Ch6 is -- type, apply an implicit conversion of the expression to that type -- to force appropriate static and run-time accessibility checks. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (R_Type) = E_Anonymous_Access_Type then Rewrite (Expr, Convert_To (R_Type, Relocate_Node (Expr))); @@ -744,7 +744,7 @@ package body Sem_Ch6 is -- expression's type is not declared at a deeper level than the -- function (RM05-6.5(5.6/2)). - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Class_Wide_Type (R_Type) then if Type_Access_Level (Etype (Expr)) > @@ -769,7 +769,7 @@ package body Sem_Ch6 is -- involving dereferences of access parameters. For now we just -- check the static cases. - if (Ada_Version < Ada_05 or else Debug_Flag_Dot_L) + if (Ada_Version < Ada_2005 or else Debug_Flag_Dot_L) and then Is_Immutably_Limited_Type (Etype (Scope_Id)) and then Object_Access_Level (Expr) > Subprogram_Access_Level (Scope_Id) @@ -2329,7 +2329,7 @@ package body Sem_Ch6 is -- is the limited view of a class-wide type and the non-limited view is -- available, update the return type accordingly. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Comes_From_Source (N) then declare @@ -2781,7 +2781,7 @@ package body Sem_Ch6 is -- Ada 2005 (AI-251): Abstract interface primitives must be abstract -- or null. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Comes_From_Source (N) and then Is_Dispatching_Operation (Designator) then @@ -2852,7 +2852,7 @@ package body Sem_Ch6 is if Nkind (Parent (N)) = N_Compilation_Unit then Set_Body_Required (Parent (N), True); - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Specification (N)) = N_Procedure_Specification and then Null_Present (Specification (N)) then @@ -2915,7 +2915,7 @@ package body Sem_Ch6 is -- Same processing for an access parameter whose designated type is -- derived from a synchronized interface. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then declare Formal : Entity_Id; Formal_Typ : Entity_Id; @@ -3695,7 +3695,7 @@ package body Sem_Ch6 is -- Ada 2005 (AI-231): In case of anonymous access types check the -- null-exclusion and access-to-constant attributes match. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Etype (Old_Type)) = E_Anonymous_Access_Type and then (Can_Never_Be_Null (Old_Type) @@ -3839,7 +3839,7 @@ package body Sem_Ch6 is New_Formal_Base := Get_Instance_Of (New_Formal_Base); end if; - Access_Types_Match := Ada_Version >= Ada_05 + Access_Types_Match := Ada_Version >= Ada_2005 -- Ensure that this rule is only applied when New_Id is a -- renaming of Old_Id. @@ -3949,7 +3949,7 @@ package body Sem_Ch6 is -- the null-exclusion and access-to-constant attributes must -- match. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ekind (Etype (Old_Formal)) = E_Anonymous_Access_Type and then Ekind (Etype (New_Formal)) = E_Anonymous_Access_Type and then @@ -5423,7 +5423,7 @@ package body Sem_Ch6 is -- In Ada2005, access constant indicators must match for -- subtype conformance. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Ctype >= Subtype_Conformant and then Is_Access_Constant (Type_1) /= Is_Access_Constant (Type_2) @@ -5461,7 +5461,7 @@ package body Sem_Ch6 is Etype (Base_Type (Desig_2)), Ctype); elsif Are_Anonymous_Access_To_Subprogram_Types then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then return Ctype = Type_Conformant or else Subtypes_Statically_Match (Desig_1, Desig_2); @@ -5712,7 +5712,7 @@ package body Sem_Ch6 is -- Ada 2005 (AI-318-02): In the case of build-in-place functions, add -- appropriate extra formals. See type Exp_Ch6.BIP_Formal_Kind. - if Ada_Version >= Ada_05 and then Is_Build_In_Place_Function (E) then + if Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function (E) then declare Result_Subt : constant Entity_Id := Etype (E); @@ -6003,7 +6003,7 @@ package body Sem_Ch6 is -- current one is the explicit overriding. elsif Ekind (E) = E_Function - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then not Comes_From_Source (E) and then Has_Controlling_Result (E) and then Is_Null_Extension (Etype (E)) @@ -7655,7 +7655,7 @@ package body Sem_Ch6 is -- of an operation that was already derived in the visible part of -- the current package. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Derived_Type) and then Present (Alias (S)) and then Is_Dispatching_Operation (Alias (S)) @@ -8306,7 +8306,7 @@ package body Sem_Ch6 is -- formal in the enclosing scope. Finally, replace the parameter -- type of the formal with the internal subtype. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Null_Exclusion_Present (Param_Spec) then if not Is_Access_Type (Formal_Type) then @@ -8423,7 +8423,7 @@ package body Sem_Ch6 is -- Ada 2005 (AI-231): Static checks - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Access_Type (Etype (Formal)) and then Can_Never_Be_Null (Etype (Formal)) then @@ -8933,7 +8933,7 @@ package body Sem_Ch6 is -- Ada 2005 (AI-231): In Ada95, access parameters are always non- -- null; In Ada 2005, only if then null_exclusion is explicit. - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 or else Can_Never_Be_Null (Etype (Formal_Id)) then Set_Is_Known_Non_Null (Formal_Id); diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 2e3b22f..c1c3d93 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -953,13 +953,13 @@ package body Sem_Ch8 is -- Ada 2005 (AI-327) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Nam) = N_Attribute_Reference and then Attribute_Name (Nam) = Name_Priority then null; - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Nkind (Nam) in N_Has_Entity then declare @@ -1102,7 +1102,7 @@ package body Sem_Ch8 is -- Ada 2005 (AI-327) - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Nkind (Nam) = N_Attribute_Reference and then Attribute_Name (Nam) = Name_Priority then @@ -2142,7 +2142,7 @@ package body Sem_Ch8 is -- when performing a null exclusion check between a renaming and a -- renamed subprogram that has been found to be illegal. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Entity (Nam) /= Any_Id then Check_Null_Exclusion @@ -2448,7 +2448,7 @@ package body Sem_Ch8 is -- is dispatching. Test is skipped if some previous error was detected -- that set Old_S to Any_Id. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Old_S /= Any_Id and then not Is_Dispatching_Operation (Old_S) and then Is_Dispatching_Operation (New_S) @@ -5675,7 +5675,7 @@ package body Sem_Ch8 is -- view of a type. if not Is_Tagged_Type (T) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then if From_With_Type (T) then Error_Msg_N @@ -5881,7 +5881,7 @@ package body Sem_Ch8 is -- nor anywhere else in the declaration because entries -- cannot have access parameters. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Parent (N)) = N_Access_Definition then Set_Entity (N, T_Name); @@ -5907,7 +5907,7 @@ package body Sem_Ch8 is -- In Ada 2005, a protected name can be used in an access -- definition within its own body. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Parent (N)) = N_Access_Definition then Set_Entity (N, T_Name); diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb index 136dfb3..2da5d1b 100644 --- a/gcc/ada/sem_ch9.adb +++ b/gcc/ada/sem_ch9.adb @@ -104,14 +104,14 @@ package body Sem_Ch9 is Analyze (T_Name); if Is_Task_Type (Etype (T_Name)) - or else (Ada_Version >= Ada_05 + or else (Ada_Version >= Ada_2005 and then Ekind (Etype (T_Name)) = E_Class_Wide_Type and then Is_Interface (Etype (T_Name)) and then Is_Task_Interface (Etype (T_Name))) then Resolve (T_Name); else - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("expect task name or task interface class-wide " & "object for ABORT", T_Name); else @@ -402,7 +402,7 @@ package body Sem_Ch9 is Check_Restriction (Max_Asynchronous_Select_Nesting, N); Check_Restriction (No_Select_Statements, N); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Trigger := Triggering_Statement (Triggering_Alternative (N)); Analyze (Trigger); @@ -448,7 +448,7 @@ package body Sem_Ch9 is -- Ada 2005 (AI-345): The trigger may be a dispatching call - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Analyze (Trigger); Check_Triggering_Statement (Trigger, N, Is_Disp_Select); end if; @@ -1158,7 +1158,7 @@ package body Sem_Ch9 is Set_Stored_Constraint (T, No_Elist); Push_Scope (T); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Check_Interfaces (N, T); end if; @@ -1966,7 +1966,7 @@ package body Sem_Ch9 is Set_Stored_Constraint (T, No_Elist); Push_Scope (T); - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Check_Interfaces (N, T); end if; @@ -2072,7 +2072,7 @@ package body Sem_Ch9 is -- Ada 2005 (AI-345): The trigger may be a dispatching call - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Analyze (Trigger); Check_Triggering_Statement (Trigger, N, Is_Disp_Select); end if; @@ -2114,7 +2114,7 @@ package body Sem_Ch9 is and then Nkind (Trigger) not in N_Delay_Statement and then Nkind (Trigger) /= N_Entry_Call_Statement then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("triggering statement must be delay or entry call", Trigger); @@ -2400,7 +2400,7 @@ package body Sem_Ch9 is -- It is not possible to have a dispatching trigger if we are not in -- Ada 2005 mode. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Nkind (Trigger) = N_Procedure_Call_Statement and then Present (Parameter_Associations (Trigger)) then diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 3c295f9..bd51df4 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -228,7 +228,7 @@ package body Sem_Disp is -- In Ada 2005, access parameters can have defaults if Ekind (Etype (Formal)) = E_Anonymous_Access_Type - and then Ada_Version < Ada_05 + and then Ada_Version < Ada_2005 then Error_Msg_N ("default not allowed for controlling access parameter", @@ -756,7 +756,7 @@ package body Sem_Disp is -- Required because primitives of concurrent types are be attached -- to the corresponding record (not to the concurrent type). - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (Tagged_Type) and then Is_Concurrent_Type (Tagged_Type) and then Present (Corresponding_Record_Type (Tagged_Type)) @@ -1809,7 +1809,7 @@ package body Sem_Disp is -- is also tag-indeterminate. elsif Nkind (Orig_Node) = N_Explicit_Dereference - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 then return Is_Tag_Indeterminate (Prefix (Orig_Node)); @@ -1876,7 +1876,7 @@ package body Sem_Disp is Replace_Elmt (Elmt, New_Op); end if; - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Has_Interfaces (Tagged_Type) then -- Ada 2005 (AI-251): Update the attribute alias of all the aliased diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 51561a1..ee613c7 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -749,7 +749,7 @@ package body Sem_Prag is procedure Ada_2012_Pragma is begin - if Ada_Version <= Ada_05 then + if Ada_Version <= Ada_2005 then Check_Restriction (No_Implementation_Pragmas, N); end if; end Ada_2012_Pragma; @@ -5412,7 +5412,7 @@ package body Sem_Prag is -- with Ada 83 or Ada 95, so we must check if we are in Ada 2005 -- or Ada 2012 mode. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Check_Valid_Configuration_Pragma; end if; @@ -5443,7 +5443,7 @@ package body Sem_Prag is -- However, we really cannot tolerate mixing Ada 2005 with Ada 83 -- or Ada 95, so we must check if we are in Ada 2005 mode. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Check_Valid_Configuration_Pragma; end if; @@ -5494,8 +5494,8 @@ package body Sem_Prag is -- Now set Ada 2005 mode - Ada_Version := Ada_05; - Ada_Version_Explicit := Ada_05; + Ada_Version := Ada_2005; + Ada_Version_Explicit := Ada_2005; end if; end; @@ -10091,7 +10091,7 @@ package body Sem_Prag is ("only allowed argument for pragma% is %", Argx); end if; - if Ada_Version_Explicit < Ada_05 + if Ada_Version_Explicit < Ada_2005 or else not Warn_On_Ada_2005_Compatibility then Active := False; @@ -10687,7 +10687,7 @@ package body Sem_Prag is -- set to Ada_2012 in a predefined unit), we need to know the -- explicit version set to know if this pragma is active. - if Ada_Version_Explicit >= Ada_05 then + if Ada_Version_Explicit >= Ada_2005 then Ent := Find_Lib_Unit_Name; Set_Is_Preelaborated (Ent); Set_Suppress_Elaboration_Warnings (Ent); @@ -11187,7 +11187,7 @@ package body Sem_Prag is -- set to Ada_2012 in a predefined unit), we need to know the -- explicit version set to know if this pragma is active. - if Ada_Version_Explicit >= Ada_05 then + if Ada_Version_Explicit >= Ada_2005 then Ent := Find_Lib_Unit_Name; Set_Is_Preelaborated (Ent, False); Set_Is_Pure (Ent); diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 353a83d..c737f24 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -301,7 +301,7 @@ package body Sem_Res is -- Include Wide_Wide_Character in Ada 2005 mode - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then Error_Msg_N ("\\possible interpretation: Wide_Wide_Character!", C); end if; @@ -708,7 +708,7 @@ package body Sem_Res is -- are handled by Analyze_Access_Attribute, Analyze_Assignment, -- Analyze_Object_Renaming, and Freeze_Entity. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Entity_Name (Pref) and then Is_Access_Type (Etype (Pref)) and then Ekind (Directly_Designated_Type (Etype (Pref))) = @@ -1372,7 +1372,7 @@ package body Sem_Res is -- Ada 2005 AI-420: Predefined equality on Universal_Access is -- available. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then (Op_Name = Name_Op_Eq or else Op_Name = Name_Op_Ne) and then Ekind (Etype (Act1)) = E_Anonymous_Access_Type then @@ -2045,7 +2045,7 @@ package body Sem_Res is -- type against which we are resolving is the same as the -- type of the interpretation. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then It.Typ = Typ and then Typ /= Universal_Integer and then Typ /= Universal_Real @@ -3351,7 +3351,7 @@ package body Sem_Res is (Etype (Expression (A))); begin if Comes_From_Source (A) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then ((Is_Private_Type (Comp_Type) and then not Is_Generic_Type (Comp_Type)) @@ -3676,7 +3676,7 @@ package body Sem_Res is -- Ada 2005 (AI-231) - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Access_Type (F_Typ) and then Can_Never_Be_Null (F_Typ) and then Known_Null (A) @@ -4259,7 +4259,7 @@ package body Sem_Res is -- the case of an initialized allocator with a class-wide argument (see -- Expand_Allocator_Expression). - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Is_Class_Wide_Type (Designated_Type (Typ)) then declare @@ -5047,7 +5047,7 @@ package body Sem_Res is and then Nkind (N) /= N_Entry_Call_Statement and then Entry_Call_Statement (Parent (N)) = N then - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then Error_Msg_N ("entry call required in select statement", N); -- Ada 2005 (AI-345): If a procedure_call_statement is used @@ -7140,7 +7140,7 @@ package body Sem_Res is -- In this case we have nothing else to do. The membership test will be -- done at run time. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Class_Wide_Type (Etype (L)) and then Is_Interface (Etype (L)) and then Is_Class_Wide_Type (Etype (R)) @@ -7196,7 +7196,7 @@ package body Sem_Res is -- Ada 2005 (AI-231): Remove restriction - if Ada_Version < Ada_05 + if Ada_Version < Ada_2005 and then not Debug_Flag_J and then Ekind (Typ) = E_Anonymous_Access_Type and then Comes_From_Source (N) @@ -7221,7 +7221,7 @@ package body Sem_Res is -- Ada 2005 (AI-231): Generate the null-excluding check in case of -- assignment to a null-excluding object - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Can_Never_Be_Null (Typ) and then Nkind (Parent (N)) = N_Assignment_Statement then @@ -8903,7 +8903,7 @@ package body Sem_Res is -- No need to perform any interface conversion if the type of the -- expression coincides with the target type. - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Expander_Active and then Operand_Typ /= Target_Typ then diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index b27f446..f082127 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -230,7 +230,7 @@ package body Sem_Type is -- Find out whether the new entry references interpretations that -- are abstract or disabled by abstract operators. - if Ada_Version >= Ada_05 then + if Ada_Version >= Ada_2005 then if Nkind (N) in N_Binary_Op then Abstr_Op := Binary_Op_Interp_Has_Abstract_Op (N, Name); elsif Nkind (N) = N_Function_Call then @@ -817,7 +817,7 @@ package body Sem_Type is -- Ada 2005 (AI-345): A class-wide abstract interface type covers a -- task_type or protected_type that implements the interface. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Class_Wide_Type (T1) and then Is_Interface (Etype (T1)) and then Is_Concurrent_Type (T2) @@ -830,7 +830,7 @@ package body Sem_Type is -- Ada 2005 (AI-251): A class-wide abstract interface type T1 covers an -- object T2 implementing T1 - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Is_Class_Wide_Type (T1) and then Is_Interface (Etype (T1)) and then Is_Tagged_Type (T2) @@ -1151,7 +1151,7 @@ package body Sem_Type is -- package Instance is new G (Formal => Actual, -- Formal_Obj => Actual_Obj); - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then Ekind (T1) = E_Anonymous_Access_Type and then Ekind (T2) = E_Anonymous_Access_Type and then Is_Generic_Type (Directly_Designated_Type (T1)) @@ -1297,7 +1297,7 @@ package body Sem_Type is begin if Nkind (N) not in N_Op - or else Ada_Version < Ada_05 + or else Ada_Version < Ada_2005 or else not Is_Overloaded (N) or else No (Universal_Interpretation (N)) then @@ -1537,7 +1537,7 @@ package body Sem_Type is -- operating in an earlier mode, in which case we discard the Ada -- 2005/2012 entity, so that we get proper Ada 95 overload resolution. - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then if Is_Ada_2005_Only (Nam1) or else Is_Ada_2012_Only (Nam1) then return It2; elsif Is_Ada_2005_Only (Nam2) or else Is_Ada_2012_Only (Nam1) then @@ -1549,7 +1549,7 @@ package body Sem_Type is -- operating in Ada 2005 mode, in which case we discard the Ada 2012 -- entity, so that we get proper Ada 2005 overload resolution. - if Ada_Version = Ada_05 then + if Ada_Version = Ada_2005 then if Is_Ada_2012_Only (Nam1) then return It2; elsif Is_Ada_2012_Only (Nam2) then @@ -1871,7 +1871,7 @@ package body Sem_Type is elsif (Chars (Nam1) = Name_Op_Eq or else Chars (Nam1) = Name_Op_Ne) - and then Ada_Version >= Ada_05 + and then Ada_Version >= Ada_2005 and then Etype (User_Subp) = Standard_Boolean then declare @@ -2017,7 +2017,7 @@ package body Sem_Type is -- P is convertible to "access Integer" by 4.6 (24.11-24.15), but there -- is no rule in 4.6 that allows "access Integer" to be converted to P. - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then (Ekind (Etype (L)) = E_Anonymous_Access_Type or else @@ -2027,7 +2027,7 @@ package body Sem_Type is then return Etype (L); - elsif Ada_Version >= Ada_05 + elsif Ada_Version >= Ada_2005 and then (Ekind (Etype (R)) = E_Anonymous_Access_Type or else Ekind (Etype (R)) = E_Anonymous_Access_Subprogram_Type) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 1550a47..ff7c4d7 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -6058,14 +6058,14 @@ package body Sem_Util is -- (despite the fact that 3.10.2(26/2) and 8.5.1(5/2) are -- semantic rules -- these rules are acknowledged to need fixing). - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then if Is_Access_Type (Prefix_Type) or else Nkind (P) = N_Explicit_Dereference then return False; end if; - elsif Ada_Version >= Ada_05 then + elsif Ada_Version >= Ada_2005 then if Is_Access_Type (Prefix_Type) then -- If the access type is pool-specific, and there is no @@ -6105,7 +6105,7 @@ package body Sem_Util is and then (Is_Declared_Within_Variant (Comp) or else Has_Discriminant_Dependent_Constraint (Comp)) - and then (not P_Aliased or else Ada_Version >= Ada_05) + and then (not P_Aliased or else Ada_Version >= Ada_2005) then return True; @@ -6934,7 +6934,7 @@ package body Sem_Util is -- because they denote entities that are not necessarily visible. -- Neither of them can apply to a protected type. - return Ada_Version >= Ada_05 + return Ada_Version >= Ada_2005 and then Is_Entity_Name (N) and then Present (Entity (N)) and then Is_Protected_Type (Entity (N)) @@ -8019,7 +8019,7 @@ package body Sem_Util is Formal : Entity_Id; begin - if Ada_Version >= Ada_05 + if Ada_Version >= Ada_2005 and then Present (First_Formal (E)) then Formal := Next_Formal (First_Formal (E)); @@ -9650,7 +9650,7 @@ package body Sem_Util is -- version of the code causes regressions in several tests that are -- compiled with -gnat95. ???) - if Ada_Version < Ada_05 then + if Ada_Version < Ada_2005 then if Is_Entity_Name (Name (Obj)) then return Subprogram_Access_Level (Entity (Name (Obj))); else diff --git a/gcc/ada/snames.adb-tmpl b/gcc/ada/snames.adb-tmpl index d3e6d35..164b11d 100644 --- a/gcc/ada/snames.adb-tmpl +++ b/gcc/ada/snames.adb-tmpl @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -368,7 +368,7 @@ package body Snames is return Get_Name_Table_Byte (N) /= 0 and then (Ada_Version >= Ada_95 or else N not in Ada_95_Reserved_Words) - and then (Ada_Version >= Ada_05 + and then (Ada_Version >= Ada_2005 or else N not in Ada_2005_Reserved_Words); end Is_Keyword_Name; diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 8050267..ba5c9eb 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -1058,7 +1058,7 @@ package body Switch.C is Bad_Switch ("-gnat0" & Switch_Chars (Ptr .. Max)); else Ptr := Ptr + 1; - Ada_Version := Ada_05; + Ada_Version := Ada_2005; Ada_Version_Explicit := Ada_Version; end if; @@ -1086,7 +1086,7 @@ package body Switch.C is Bad_Switch ("-gnat" & Switch_Chars (Ptr .. Max)); elsif Switch_Chars (Ptr .. Ptr + 3) = "2005" then - Ada_Version := Ada_05; + Ada_Version := Ada_2005; elsif Switch_Chars (Ptr .. Ptr + 3) = "2012" then Ada_Version := Ada_2012; diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index 350ff94..2e56cce 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -598,7 +598,7 @@ begin Write_Switch_Char ("05"); - if Ada_Version_Default = Ada_05 then + if Ada_Version_Default = Ada_2005 then Write_Line ("Ada 2005 mode (default)"); else Write_Line ("Enforce Ada 2005 restrictions"); -- 2.7.4