aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch2.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 12:21:44 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 12:21:44 +0200
commit4017021b3585d2d9c0ce2521e32fa0a532c25cab (patch)
treebf94e39042c5b3d4750165692d29ac1028365b68 /gcc/ada/exp_ch2.adb
parent24357840f1d9fbeb5f604b33b541479786d9910a (diff)
downloadgcc-4017021b3585d2d9c0ce2521e32fa0a532c25cab.zip
gcc-4017021b3585d2d9c0ce2521e32fa0a532c25cab.tar.gz
gcc-4017021b3585d2d9c0ce2521e32fa0a532c25cab.tar.bz2
[multiple changes]
2009-04-10 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Pragma, case Task_Name): Do not expand argument of pragma. It will be recopied and analyzed when used in call to Create_Task. * sem_res.adb (Resolve_Call): Clarify use of secondary stack within initialization operations and recognize use of it in procedure calls within init_procs. * exp_ch9.adb (Make_Task_Create_Call): Copy full tree of Task_Name argument, because it may have side-effects. * exp_ch2.adb: Remove obsolete comments on default functions 2009-04-10 Jose Ruiz <ruiz@adacore.com> * adaint.c (RTX section): Do for RTX the same thing as we do for Windows (include ctype.h and define a fallback ISALPHA if IN_RTS). From-SVN: r145882
Diffstat (limited to 'gcc/ada/exp_ch2.adb')
-rw-r--r--gcc/ada/exp_ch2.adb13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch2.adb b/gcc/ada/exp_ch2.adb
index 3825405..2963ae8 100644
--- a/gcc/ada/exp_ch2.adb
+++ b/gcc/ada/exp_ch2.adb
@@ -267,11 +267,9 @@ package body Exp_Ch2 is
end loop;
-- If the discriminant occurs within the default expression for a
- -- formal of an entry or protected operation, create a default
- -- function for it, and replace the discriminant with a reference to
- -- the discriminant of the formal of the default function. The
- -- discriminant entity is the one defined in the corresponding
- -- record.
+ -- formal of an entry or protected operation, replace it with a
+ -- reference to the discriminant of the formal of the enclosing
+ -- operation.
if Present (Parent_P)
and then Present (Corresponding_Spec (Parent_P))
@@ -284,8 +282,9 @@ package body Exp_Ch2 is
Disc : Entity_Id;
begin
- -- Verify that we are within a default function: the type of
- -- its formal parameter is the same task or protected type.
+ -- Verify that we are within the body of an entry or protected
+ -- operation. Its first formal parameter is the synchronized
+ -- type itself.
if Present (Formal)
and then Etype (Formal) = Scope (Entity (N))