diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-23 10:19:53 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-23 10:19:53 +0200 |
commit | 50878404473455327bb16a227beab6a742bcec41 (patch) | |
tree | c423732a807b7aef4ba67bc5ebfea36f4fe50f04 /gcc/ada/par-ch6.adb | |
parent | 473e20df28ec46b084ea6a965ab07c3e4f11288d (diff) | |
download | gcc-50878404473455327bb16a227beab6a742bcec41.zip gcc-50878404473455327bb16a227beab6a742bcec41.tar.gz gcc-50878404473455327bb16a227beab6a742bcec41.tar.bz2 |
[multiple changes]
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
to a formal object of an anonymous access type.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
aspect can have more than one index, e.g. to describe indexing
of a multidimensional object.
2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
now more complex and contains optional finalization part and mandatory
deallocation part.
2012-07-23 Gary Dismukes <dismukes@adacore.com>
* a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb,
a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress
Accessibility_Check for Element_Type allocators.
2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
* projects.texi: Fix typo.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Explicit_Derenference): If prefix is
overloaded, remove those interpretations whose designated type
does not match the context, to avoid spurious ambiguities that
may be caused by the Ada 2012 conversion rule for anonymous
access types.
From-SVN: r189774
Diffstat (limited to 'gcc/ada/par-ch6.adb')
-rw-r--r-- | gcc/ada/par-ch6.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb index a05e79b..4f6ccb5 100644 --- a/gcc/ada/par-ch6.adb +++ b/gcc/ada/par-ch6.adb @@ -1562,7 +1562,12 @@ package body Ch6 is ("(style) IN should be omitted"); end if; - if Token = Tok_Access then + -- Since Ada 2005, formal objects can have an anonymous access type, + -- and of course carry a mode indicator. + + if Token = Tok_Access + and then Nkind (Node) /= N_Formal_Object_Declaration + then Error_Msg_SP ("IN not allowed together with ACCESS"); Scan; -- past ACCESS end if; |