diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 12:13:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-11 12:13:26 +0200 |
commit | dd386db05d50b7147c1832e242590baf96c5ebae (patch) | |
tree | 60052b8b59e54383886c560597cfb24f91f11c58 /gcc/ada/freeze.adb | |
parent | 6dfc55927f4717baa28c751fedb85834733f7b0d (diff) | |
download | gcc-dd386db05d50b7147c1832e242590baf96c5ebae.zip gcc-dd386db05d50b7147c1832e242590baf96c5ebae.tar.gz gcc-dd386db05d50b7147c1832e242590baf96c5ebae.tar.bz2 |
[multiple changes]
2010-10-11 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Expand_Call): For VM platforms, add missing expansion of
tag check in case of dispatching call through "=".
2010-10-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Subprogram_Declaration): In Ada2012 an incomplete
type is legal in the profile of any basic declaration.
* sem_ch6.adb (Analyze_Return_Type, Process_Formals): In Ada2012 an
incomplete type, including a limited view of a type, is legal in the
profile of any subprogram declaration.
If the type is tagged, its use is also legal in a body.
* sem_ch10.adb (Install_Limited_With_Clause): Do not process context
item if misplaced.
(Install_Limited_Withed_Unit): Refine legality checks when both the
limited and the non-limited view of a package are visible in the context
of a unit.
If this is not an error case, the limited view is ignored.
freeze.adb (Freeze_Entity): In Ada2012, an incomplete type is legal in
access to subprogram declarations
From-SVN: r165295
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r-- | gcc/ada/freeze.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index b21ee15..c807220 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3738,7 +3738,11 @@ package body Freeze is then if Is_Tagged_Type (Etype (Formal)) then null; - else + + -- AI05-151 : incomplete types are allowed in access to + -- subprogram specifications. + + elsif Ada_Version < Ada_2012 then Error_Msg_NE ("invalid use of incomplete type&", E, Etype (Formal)); end if; |