diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:48:46 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:48:46 +0200 |
commit | 7324247364df0b8e4be9038eea1d8cfc032de677 (patch) | |
tree | 40e3baa427d137f4060155dfde148ba8cc87d31b | |
parent | 97ed5872c6629a96fcc4b4ff4ccaca41950ae26c (diff) | |
download | gcc-7324247364df0b8e4be9038eea1d8cfc032de677.zip gcc-7324247364df0b8e4be9038eea1d8cfc032de677.tar.gz gcc-7324247364df0b8e4be9038eea1d8cfc032de677.tar.bz2 |
[multiple changes]
2011-08-05 Emmanuel Briot <briot@adacore.com>
* projects.texi: Added reference to the Makefile package.
2011-08-05 Thomas Quinot <quinot@adacore.com>
* exp_ch7.adb: Minor comment rewording.
2011-08-05 Ed Falis <falis@adacore.com>
* env.c: Fix comment.
2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
character comparison and rely on concrete entities instead.
From-SVN: r177435
-rw-r--r-- | gcc/ada/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/ada/env.c | 2 | ||||
-rw-r--r-- | gcc/ada/exp_ch7.adb | 2 | ||||
-rw-r--r-- | gcc/ada/projects.texi | 4 | ||||
-rw-r--r-- | gcc/ada/sem_elab.adb | 46 |
5 files changed, 62 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2ee55914..ecbcadc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2011-08-05 Emmanuel Briot <briot@adacore.com> + + * projects.texi: Added reference to the Makefile package. + +2011-08-05 Thomas Quinot <quinot@adacore.com> + + * exp_ch7.adb: Minor comment rewording. + +2011-08-05 Ed Falis <falis@adacore.com> + + * env.c: Fix comment. + +2011-08-05 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid + character comparison and rely on concrete entities instead. + 2011-08-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: (Check_Private_Overriding): better error message, diff --git a/gcc/ada/env.c b/gcc/ada/env.c index 9d7301f..1719684 100644 --- a/gcc/ada/env.c +++ b/gcc/ada/env.c @@ -63,7 +63,7 @@ extern "C" { #elif defined (VTHREADS) /* VTHREADS mode applies to both VxWorks 653 and VxWorks MILS. The inclusion of vThreadsData.h is necessary to workaround a bug with - envLib.h on VxWorks MILS. */ + envLib.h on VxWorks MILS and VxWorks 653. */ #include <vThreadsData.h> #include <envLib.h> #else diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 735f865..a537e60 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -2272,7 +2272,7 @@ package body Exp_Ch7 is function Next_Suitable_Statement (Stmt : Node_Id) return Node_Id; -- Given a statement which is part of a list, return the next - -- real statement while skipping over generated checks. + -- real statement while skipping over dynamic elab checks. ------------------ -- Is_Init_Call -- diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index 4603a4f..2a3e5bc 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -2871,6 +2871,10 @@ The following packages are currently supported in project files @item Linker This package specifies the options used by the linker. @xref{Main Subprograms}. +@item Makefile +@cindex Makefile package in projects + This package is used by the GPS plugin Makefile.py. See the documentation + in that plugin (from GPS: /Tools/Plug-ins). @item Metrics This package specifies the options used when calling the tool @command{gnatmetric} via the @command{gnat} driver. Its attributes diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index a5130c1..fab5370 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -2938,13 +2938,45 @@ package body Sem_Elab is function Is_Finalization_Procedure (Id : Entity_Id) return Boolean is begin - return - Ekind (Id) = E_Procedure - and then - (Chars (Id) = Name_Finalize - or else Is_TSS (Id, TSS_Deep_Finalize)) - and then Present (First_Formal (Id)) - and then Needs_Finalization (Etype (First_Formal (Id))); + -- Check whether Id is a procedure with at least one parameter + + if Ekind (Id) = E_Procedure + and then Present (First_Formal (Id)) + then + declare + Typ : constant Entity_Id := Etype (First_Formal (Id)); + Deep_Fin : Entity_Id := Empty; + Fin : Entity_Id := Empty; + + begin + -- If the type of the first formal does not require finalization + -- actions, then this is definitely not [Deep_]Finalize. + + if not Needs_Finalization (Typ) then + return False; + end if; + + -- At this point we have the following scenario: + + -- procedure Name (Param1 : [in] [out] Ctrl[; Param2 : ...]); + + -- Recover the two possible versions of [Deep_]Finalize using the + -- type of the first parameter and compare with the input. + + Deep_Fin := TSS (Typ, TSS_Deep_Finalize); + + if Is_Controlled (Typ) then + Fin := Find_Prim_Op (Typ, Name_Finalize); + end if; + + return + (Present (Deep_Fin) and then Id = Deep_Fin) + or else + (Present (Fin) and then Id = Fin); + end; + end if; + + return False; end Is_Finalization_Procedure; ------------------ |