aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2007-09-26 12:42:49 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-09-26 12:42:49 +0200
commitfdce4bb79eb092b412c272e92435b57147312011 (patch)
treecfeb29e644e078a2c07b74278a02a9f14cd72b12 /gcc/ada/exp_attr.adb
parent2642f9987ea72b416bce764ca3d95c19c9e77836 (diff)
downloadgcc-fdce4bb79eb092b412c272e92435b57147312011.zip
gcc-fdce4bb79eb092b412c272e92435b57147312011.tar.gz
gcc-fdce4bb79eb092b412c272e92435b57147312011.tar.bz2
einfo.adb (Is_Thunk): New attribute applicable to subprograms.
2007-09-26 Javier Miranda <miranda@adacore.com> Gary Dismukes <dismukes@adacore.com> * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True for thunks associated with interface types. * einfo.ads: Improve documentatation of Is_Internal (Is_Thunk): New attribute applicable to subprograms. True for thunks associated with interface types. Extensive comment fixes regarding flags that appear in all entities. The documentation is now consistent for all such flags (there were a number of errors in the documentation in this regard). * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup. * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any of these procedures are passed a function call that already has build-in-place actuals (testing new flag Is_Expanded_Build_In_Place_Call). Set the flag on the function call in the case where processing continues. (Expand_Call): If the call is generated from a thunk body then we propagate the extra actuals associated with the accessibility level of the access type actuals. * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field of each extra formal of a protected operation to reference the corresponding extra formal of the subprogram denoted by the operation's Protected_Body_Subprogram. * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on N_Function_Call nodes. From-SVN: r128786
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 272d8e2..8564bea 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -637,12 +637,10 @@ package body Exp_Attr is
pragma Assert (Present (Formal));
Rewrite (N,
- Unchecked_Convert_To
- (Typ, New_Occurrence_Of (Formal, Loc)));
+ Unchecked_Convert_To (Typ,
+ New_Occurrence_Of (Formal, Loc)));
Set_Etype (N, Typ);
- return;
-
-- The expression must appear in a default expression, (which
-- in the initialization procedure is the right-hand side of an
-- assignment), and not in a discriminant constraint.
@@ -667,8 +665,6 @@ package body Exp_Attr is
Analyze_And_Resolve (N, Typ);
end if;
-
- return;
end if;
end;
@@ -702,8 +698,8 @@ package body Exp_Attr is
-- Note: Limit the expansion of an attribute applied to a
-- dereference of an access parameter so that it's only done
-- for 'Access. This fixes a problem with 'Unrestricted_Access
- -- that leads to errors in the case where the attribute
- -- type is access-to-variable and the access parameter is
+ -- that leads to errors in the case where the attribute type
+ -- is access-to-variable and the access parameter is
-- access-to-constant. The conversion is only done to get
-- accessibility checks, so it makes sense to limit it to
-- 'Access (and consistent with existing comment).