diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-08 15:10:27 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-08 15:10:27 +0200 |
commit | b878c9389eaf6453f7586f4a8366b28c88240301 (patch) | |
tree | 3110619a9538d02b4e23c7b82d7678826d368501 /gcc | |
parent | 78e27dd3b46aff163952b555a647398cb803da53 (diff) | |
download | gcc-b878c9389eaf6453f7586f4a8366b28c88240301.zip gcc-b878c9389eaf6453f7586f4a8366b28c88240301.tar.gz gcc-b878c9389eaf6453f7586f4a8366b28c88240301.tar.bz2 |
[multiple changes]
2010-10-08 Ed Schonberg <schonberg@adacore.com>
* sem_aux.adb: Cleanup Is_Immutably_Limited_Type.
2010-10-08 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb: Minor reformatting.
* exp_ch5.adb: Add comment.
From-SVN: r165177
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ada/exp_ch3.adb | 3 | ||||
-rw-r--r-- | gcc/ada/exp_ch5.adb | 4 | ||||
-rwxr-xr-x | gcc/ada/sem_aux.adb | 13 |
4 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 208867f..4543c69 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2010-10-08 Ed Schonberg <schonberg@adacore.com> + + * sem_aux.adb: Cleanup Is_Immutably_Limited_Type. + +2010-10-08 Robert Dewar <dewar@adacore.com> + + * exp_ch3.adb: Minor reformatting. + * exp_ch5.adb: Add comment. + 2010-10-08 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Check_Duplicate_Pragma): Check for entity match diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 7dc6842..156a83d 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6198,7 +6198,8 @@ package body Exp_Ch3 is end if; end; - -- Otherwise create primitive equality operation (AI05-0123) + -- Otherwise create primitive equality operation (AI05-0123) + -- This is done unconditionally to ensure that tools can be linked -- properly with user programs compiled with older language versions. -- It might be worth including a switch to revert to a non-composable diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 2c2ddb0..f53ac1f 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -4247,9 +4247,11 @@ package body Exp_Ch5 is Reason => PE_Accessibility_Check_Failed)); end; - -- AI05-0073 : if function has a controlling access result, check that + -- AI05-0073: If function has a controlling access result, check that -- the tag of the return value matches the designated type. + -- The "or else True" needs commenting here ??? + elsif Ekind (R_Type) = E_Anonymous_Access_Type and then Has_Controlling_Result (Scope_Id) and then (Ada_Version >= Ada_12 or else True) diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index c1a41ce..bfe57f0 100755 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -578,14 +578,13 @@ package body Sem_Aux is Btype : constant Entity_Id := Base_Type (Ent); begin - if Ekind (Btype) = E_Limited_Private_Type then - if Nkind (Parent (Btype)) = N_Formal_Type_Declaration then - return not In_Package_Body (Scope ((Btype))); - else - return True; - end if; + if Ekind (Btype) = E_Limited_Private_Type + and then Nkind (Parent (Btype)) = N_Formal_Type_Declaration + then + return not In_Package_Body (Scope ((Btype))); + end if; - elsif Is_Private_Type (Btype) then + if Is_Private_Type (Btype) then -- AI05-0063 : a type derived from a limited private formal type -- is not immutably limited in a generic body. |