This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r138388 - in /trunk/gcc/ada: exp_attr.adb exp_c...
- From: charlet at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 31 Jul 2008 11:04:10 -0000
- Subject: r138388 - in /trunk/gcc/ada: exp_attr.adb exp_c...
Author: charlet
Date: Thu Jul 31 11:04:10 2008
New Revision: 138388
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138388
Log:
2008-07-31 Gary Dismukes <dismukes@adacore.com>
* exp_attr.adb (Enclosing_Object): New function local to handling of
access attributes,
for retrieving the innermost enclosing object prefix of a compound name.
(Expand_N_Attribute_Reference, N_Attribute_Access): In the case where an
Access attribute has a prefix that is a dereference of an access
parameter (or the prefix is a subcomponent selected from such a
dereference), apply an accessibility check to the access parameter.
Replaces code that rewrote the prefix as a type conversion (and that
didn't handle subcomponent cases).
Also, this is now only applied in the case of 'Access.
* exp_ch6.adb (Expand_Call): Add handling for the case of an access
discriminant passed as an actual to an access formal, passing the
Object_Access_Level of the object containing the access discriminant.
Modified:
trunk/gcc/ada/exp_attr.adb
trunk/gcc/ada/exp_ch6.adb