diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-07 14:45:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-07 14:45:48 +0200 |
commit | 2e79de51b02b742c716f5bf94bb2cbff62b5fa6e (patch) | |
tree | b5d98752418158a359ebc8106e255270aba2aff9 /gcc/ada/par-ch10.adb | |
parent | da7d70aae388ceeefd8b829865ba6ea55d4171c9 (diff) | |
download | gcc-2e79de51b02b742c716f5bf94bb2cbff62b5fa6e.zip gcc-2e79de51b02b742c716f5bf94bb2cbff62b5fa6e.tar.gz gcc-2e79de51b02b742c716f5bf94bb2cbff62b5fa6e.tar.bz2 |
[multiple changes]
2010-10-07 Robert Dewar <dewar@adacore.com>
* 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 <schonberg@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/par-ch10.adb')
-rw-r--r-- | gcc/ada/par-ch10.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb index c7dfee8..e59a8c0 100644 --- a/gcc/ada/par-ch10.adb +++ b/gcc/ada/par-ch10.adb @@ -347,10 +347,10 @@ package body Ch10 is Error_Msg_BC -- CODEFIX ("keyword BODY expected here [see file name]"); Restore_Scan_State (Scan_State); - Set_Unit (Comp_Unit_Node, P_Package (Pf_Pbod)); + Set_Unit (Comp_Unit_Node, P_Package (Pf_Pbod_Pexp)); else Restore_Scan_State (Scan_State); - Set_Unit (Comp_Unit_Node, P_Package (Pf_Decl_Gins_Pbod_Rnam)); + Set_Unit (Comp_Unit_Node, P_Package (Pf_Decl_Gins_Pbod_Rnam_Pexp)); end if; elsif Token = Tok_Generic then @@ -364,7 +364,7 @@ package body Ch10 is or else Token = Tok_Overriding or else Token = Tok_Procedure then - Set_Unit (Comp_Unit_Node, P_Subprogram (Pf_Decl_Gins_Pbod_Rnam)); + Set_Unit (Comp_Unit_Node, P_Subprogram (Pf_Decl_Gins_Pbod_Rnam_Pexp)); -- A little bit of an error recovery check here. If we just scanned -- a subprogram declaration (as indicated by an SIS entry being @@ -1034,10 +1034,10 @@ package body Ch10 is or else Token = Tok_Overriding or else Token = Tok_Procedure then - Body_Node := P_Subprogram (Pf_Pbod); + Body_Node := P_Subprogram (Pf_Pbod_Pexp); elsif Token = Tok_Package then - Body_Node := P_Package (Pf_Pbod); + Body_Node := P_Package (Pf_Pbod_Pexp); elsif Token = Tok_Protected then Scan; -- past PROTECTED |