diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 12:46:57 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 12:46:57 +0200 |
commit | ee2e3f6bb4978d0b148e7458dd6915dbc28fdaf3 (patch) | |
tree | ad06b98e051e01d32fdbef3c6563086d7ec598d3 /gcc/ada/sem_cat.adb | |
parent | 646e2823137ee4f66ce92a6cf9947e308526de00 (diff) | |
download | gcc-ee2e3f6bb4978d0b148e7458dd6915dbc28fdaf3.zip gcc-ee2e3f6bb4978d0b148e7458dd6915dbc28fdaf3.tar.gz gcc-ee2e3f6bb4978d0b148e7458dd6915dbc28fdaf3.tar.bz2 |
[multiple changes]
2011-08-29 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
exp_dist.adb: Minor code reorganization.
Minor reformatting.
2011-08-29 Thomas Quinot <quinot@adacore.com>
* sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
primitive operation must support external streaming if it is not a
controlling access result.
From-SVN: r178199
Diffstat (limited to 'gcc/ada/sem_cat.adb')
-rw-r--r-- | gcc/ada/sem_cat.adb | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index 7b0a1fb..58aaee1 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -1391,6 +1391,10 @@ package body Sem_Cat is if Ekind (Subp) = E_Function then Rtyp := Etype (Subp); + -- AI05-0101 (Binding Interpretation): The result type of a remote + -- function must either support external streaming or be a + -- controlling access result type. + if Has_Controlling_Result (Subp) then null; @@ -1406,19 +1410,16 @@ package body Sem_Cat is ("limited return type must have Read and Write attributes", Parent (Subp)); Explain_Limited_Type (Rtyp, Parent (Subp)); + end if; - -- Check that the return type supports external streaming. - -- Note that the language of the standard (E.2.2(14)) does not - -- explicitly mention that case, but it really does not make - -- sense to return a value containing a local access type. + -- Check that the return type supports external streaming - elsif No_External_Streaming (Rtyp) - and then not Error_Posted (Rtyp) - then - Illegal_Remote_Subp ("return type containing non-remote access " - & "must have Read and Write attributes", - Parent (Subp)); - end if; + elsif No_External_Streaming (Rtyp) + and then not Error_Posted (Rtyp) + then + Illegal_Remote_Subp ("return type containing non-remote access " + & "must have Read and Write attributes", + Parent (Subp)); end if; end if; @@ -1674,13 +1675,8 @@ package body Sem_Cat is then return True; - -- A limited interface is not currently a legal ancestor for the - -- designated type of an RACW type, because a type that implements - -- such an interface need not be limited. However, the ARG seems to - -- incline towards allowing an access to classwide limited interface - -- type as a remote access type, as resolved in AI05-060. But note - -- that the expansion circuitry for RACWs that designate classwide - -- interfaces is not complete yet. + -- AI05-0060 (Binding Interpretation): A limited interface is a legal + -- ancestor for the designated type of an RACW type. elsif Is_Limited_Record (E) and then Is_Limited_Interface (E) then return True; |