From 2e79de51b02b742c716f5bf94bb2cbff62b5fa6e Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 7 Oct 2010 14:45:48 +0200 Subject: [multiple changes] 2010-10-07 Robert Dewar * par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add Pexp to Pf_Rec constants (P_Subprogram): Expression is always enclosed in parentheses * par.adb (Pf_Rec): add Pexp flag for parametrized expression * sinfo.ads (N_Parametrized_Expression): Expression must be in parens 2010-10-07 Ed Schonberg * sem_ch6.adb (Analyze_Subprogram_Specification): Implement Ada2012 checks on functions that return an abstract type or have a controlling result whose designated type is an abstract type. (Check_Private_Overriding): Implement Ada2012 checks on functions declared in the private part, if an abstract type is involved. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): In Ada2012, reject a generic function that returns an abstract type. * exp_ch5.adb (Expand_Simple_Function_Return): in Ada2012, if a function has a controlling access result, check that the tag of the return value matches the designated type of the return expression. From-SVN: r165100 --- gcc/ada/par.adb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'gcc/ada/par.adb') diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 8a0c901..7ba6e0c 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -352,7 +352,7 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is Pbod : Boolean; -- True if proper body OK Rnam : Boolean; -- True if renaming declaration OK Stub : Boolean; -- True if body stub OK - Fil1 : Boolean; -- Filler to fill to 8 bits + Pexp : Boolean; -- True if parametried expression OK Fil2 : Boolean; -- Filler to fill to 8 bits end record; pragma Pack (Pf_Rec); @@ -360,18 +360,18 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is function T return Boolean renames True; function F return Boolean renames False; - Pf_Decl_Gins_Pbod_Rnam_Stub : constant Pf_Rec := - Pf_Rec'(F, T, T, T, T, T, F, F); - Pf_Decl : constant Pf_Rec := - Pf_Rec'(F, T, F, F, F, F, F, F); - Pf_Decl_Gins_Pbod_Rnam : constant Pf_Rec := - Pf_Rec'(F, T, T, T, T, F, F, F); - Pf_Decl_Pbod : constant Pf_Rec := - Pf_Rec'(F, T, F, T, F, F, F, F); - Pf_Pbod : constant Pf_Rec := - Pf_Rec'(F, F, F, T, F, F, F, F); - Pf_Spcn : constant Pf_Rec := - Pf_Rec'(T, F, F, F, F, F, F, F); + Pf_Decl_Gins_Pbod_Rnam_Stub_Pexp : constant Pf_Rec := + Pf_Rec'(F, T, T, T, T, T, T, F); + Pf_Decl_Pexp : constant Pf_Rec := + Pf_Rec'(F, T, F, F, F, F, T, F); + Pf_Decl_Gins_Pbod_Rnam_Pexp : constant Pf_Rec := + Pf_Rec'(F, T, T, T, T, F, T, F); + Pf_Decl_Pbod_Pexp : constant Pf_Rec := + Pf_Rec'(F, T, F, T, F, F, T, F); + Pf_Pbod_Pexp : constant Pf_Rec := + Pf_Rec'(F, F, F, T, F, F, T, F); + Pf_Spcn : constant Pf_Rec := + Pf_Rec'(T, F, F, F, F, F, F, F); -- The above are the only allowed values of Pf_Rec arguments type SS_Rec is record -- cgit v1.1