From d67ffa886d642c7a08441023971a3c5099b58d4e Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 20 Apr 2016 11:07:12 +0200 Subject: [PATCH] [multiple changes] 2016-04-20 Vincent Celier * clean.adb (Gnatclean): Fail if project file specified and gprclean is not available. * gnatname.adb: Fail is -P is used and gprname is not available. * make.adb (Initialize): Fail if project file specified and gprbuild is not available. 2016-04-20 Bob Duff * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary stack when possible. From-SVN: r235241 --- gcc/ada/ChangeLog | 13 +++++++++++++ gcc/ada/clean.adb | 5 ++--- gcc/ada/gnatname.adb | 4 +--- gcc/ada/make.adb | 5 ++--- gcc/ada/sem_ch5.adb | 22 ++++++++++++---------- 5 files changed, 30 insertions(+), 19 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 75201ec493e..fd077b3b01f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2016-04-20 Vincent Celier + + * clean.adb (Gnatclean): Fail if project file specified and + gprclean is not available. + * gnatname.adb: Fail is -P is used and gprname is not available. + * make.adb (Initialize): Fail if project file specified and + gprbuild is not available. + +2016-04-20 Bob Duff + + * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary + stack when possible. + 2016-04-20 Gary Dismukes * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb index 805f65393a8..814f47107b3 100644 --- a/gcc/ada/clean.adb +++ b/gcc/ada/clean.adb @@ -1386,9 +1386,8 @@ package body Clean is -- Warn about 'gnatclean -P' if Project_File_Name /= null then - Put_Line - ("warning: gnatclean -P is obsolete and will not be available " - & "in the next release; use gprclean instead."); + Fail + ("project files are no longer supported; use gprclean instead."); end if; -- A project file was specified by a -P switch diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb index a01bbb20eeb..bd0c8612045 100644 --- a/gcc/ada/gnatname.adb +++ b/gcc/ada/gnatname.adb @@ -659,9 +659,7 @@ begin -- gprname did not succeed. if Create_Project then - Write_Line - ("warning: gnatname -P is obsolete and will not be available in the " - & "next release; use gprname instead"); + Fail ("project files are no longer supported; use gprname instead"); end if; -- If no Ada or foreign pattern was specified, print the usage and return diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index c5bf2b901b8..fb70e378a21 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -6509,9 +6509,8 @@ package body Make is -- Warn about 'gnatmake -P' if Project_File_Name /= null then - Write_Line - ("warning: gnatmake -P is obsolete and will not be available " - & "in the next release; use gprbuild instead"); + Make_Failed + ("project files are no longer supported; use gprbuild instead"); end if; -- If --subdirs= is specified, but not -P, this is equivalent to -D, diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 64b05ff9502..2309ada48a2 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -1753,14 +1753,6 @@ package body Sem_Ch5 is ------------------------------------ procedure Analyze_Iterator_Specification (N : Node_Id) is - Loc : constant Source_Ptr := Sloc (N); - Def_Id : constant Node_Id := Defining_Identifier (N); - Subt : constant Node_Id := Subtype_Indication (N); - Iter_Name : constant Node_Id := Name (N); - - Typ : Entity_Id; - Bas : Entity_Id; - procedure Check_Reverse_Iteration (Typ : Entity_Id); -- For an iteration over a container, if the loop carries the Reverse -- indicator, verify that the container type has an Iterate aspect that @@ -1822,6 +1814,16 @@ package body Sem_Ch5 is return Etype (Ent); end Get_Cursor_Type; + -- Local variables + + Def_Id : constant Node_Id := Defining_Identifier (N); + Iter_Name : constant Node_Id := Name (N); + Loc : constant Source_Ptr := Sloc (N); + Subt : constant Node_Id := Subtype_Indication (N); + + Bas : Entity_Id; + Typ : Entity_Id; + -- Start of processing for Analyze_iterator_Specification begin @@ -1925,7 +1927,7 @@ package body Sem_Ch5 is -- Do not perform this expansion in SPARK mode, since the formal -- verification directly deals with the source form of the iterator. - -- Ditto for ASIS and when expansion is disabled,, where the temporary + -- Ditto for ASIS and when expansion is disabled, where the temporary -- may hide the transformation of a selected component into a prefixed -- function call, and references need to see the original expression. @@ -2001,7 +2003,7 @@ package body Sem_Ch5 is -- to it. It has no effect on the generated code if no actions -- are added to it (see Wrap_Transient_Declaration). - if Expander_Active then + if not Is_Array_Type (Typ) and then Expander_Active then Establish_Transient_Scope (Name (Decl), Sec_Stack => True); end if; -- 2.30.2