diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-23 09:45:55 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-23 09:45:55 +0000 |
commit | adf351ab140e76c1886c609ec31cc8989d646ba6 (patch) | |
tree | 28048c0577165934f18995fe4e2c340933927011 /gcc/ada/sem_res.adb | |
parent | 16f7fff25f3867651aa855271e62f9695b7d40cb (diff) | |
download | gcc-adf351ab140e76c1886c609ec31cc8989d646ba6.tar.gz |
2013-04-23 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function
(can apply to any scope entity).
* sem_res.adb (Resolve_Call): If the call is within another
expression function it does not constitute a freeze point.
2013-04-23 Yannick Moy <moy@adacore.com>
* exp_ch6.adb (Expand_Actuals): Test that Subp
is overloadable before testing if it's an inherited operation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 99fd9d52ab1..7d00399f52d 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -5386,12 +5386,14 @@ package body Sem_Res is -- In Ada 2012, expression functions may be called within pre/post -- conditions of subsequent functions or expression functions. Such - -- calls do not freeze when they appear within generated bodies, which - -- would place the freeze node in the wrong scope. An expression - -- function is frozen in the usual fashion, by the appearance of a real - -- body, or at the end of a declarative part. + -- calls do not freeze when they appear within generated bodies, + -- (including the body of another expression function) which would + -- place the freeze node in the wrong scope. An expression function + -- is frozen in the usual fashion, by the appearance of a real body, + -- or at the end of a declarative part. if Is_Entity_Name (Subp) and then not In_Spec_Expression + and then not Is_Expression_Function (Current_Scope) and then (not Is_Expression_Function (Entity (Subp)) or else Scope (Entity (Subp)) = Current_Scope) |