]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 09:31:02 +0000 (11:31 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Sep 2010 09:31:02 +0000 (11:31 +0200)
2010-09-10  Robert Dewar  <dewar@adacore.com>

* g-pehage.ads: Minor reformatting

* gnat_ugn.texi: Clarifying comment on -gnatyc
* exp_ch6.adb (Expand_N_Subprogram_Body): Reset Is_Pure if limited
arguments.

2010-09-10  Tristan Gingold  <gingold@adacore.com>

* Make-generated.in (gnat.hlp): New rule.

2010-09-10  Emmanuel Briot  <briot@adacore.com>

* prj-util.adb, prj-util.ads (Executable_Of): New parameter
Include_Suffix.

From-SVN: r164146

gcc/ada/ChangeLog
gcc/ada/Make-generated.in
gcc/ada/exp_ch6.adb
gcc/ada/g-pehage.ads
gcc/ada/gnat_ugn.texi
gcc/ada/prj-util.adb
gcc/ada/prj-util.ads

index 6e81788636a8213e1a4023e75013b5e9835dcd14..e718fc06ed72c24928c0ca31b9c5444c66cd9234 100644 (file)
@@ -1,3 +1,20 @@
+2010-09-10  Robert Dewar  <dewar@adacore.com>
+
+       * g-pehage.ads: Minor reformatting
+
+       * gnat_ugn.texi: Clarifying comment on -gnatyc
+       * exp_ch6.adb (Expand_N_Subprogram_Body): Reset Is_Pure if limited
+       arguments.
+
+2010-09-10  Tristan Gingold  <gingold@adacore.com>
+
+       * Make-generated.in (gnat.hlp): New rule.
+
+2010-09-10  Emmanuel Briot  <briot@adacore.com>
+
+       * prj-util.adb, prj-util.ads (Executable_Of): New parameter
+       Include_Suffix.
+
 2010-09-10  Robert Dewar  <dewar@adacore.com>
 
        * einfo.adb: Minor code cleanup: Add assertion to
index 06cb4a214688bf993634ed2eb37f684b22a40b24..6942d7a5fccd5f383095f751687836d3480541e2 100644 (file)
@@ -124,3 +124,11 @@ $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
        $(ECHO) "end Sdefault;" >> tmp-sdefault.adb
        $(MOVE_IF_CHANGE) tmp-sdefault.adb $(ADA_GEN_SUBDIR)/sdefault.adb
        touch $(ADA_GEN_SUBDIR)/stamp-sdefault
+
+$(ADA_GEN_SUBDIR)/gnat.hlp :  $(ADA_GEN_SUBDIR)/vms_help.adb $(ADA_GEN_SUBDIR)/vms_cmds.ads $(ADA_GEN_SUBDIR)/gnat.help_in $(ADA_GEN_SUBDIR)/vms_data.ads
+       -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp
+       $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp/,$(notdir $^))
+       $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp
+       (cd $(ADA_GEN_SUBDIR)/bldtools/gnat_hlp; \
+         gnatmake -q vms_help; \
+         ./vms_help$(build_exeext) gnat.help_in vms_data.ads ../../gnat.hlp)
index 26ce78429c1be8cb91eb8336c5d4ee3344a571a1..a2b6c16a08fe510b06231a39e8682dccd001da43 100644 (file)
@@ -4096,6 +4096,7 @@ package body Exp_Ch6 is
    --  Initialize scalar out parameters if Initialize/Normalize_Scalars
 
    --  Reset Pure indication if any parameter has root type System.Address
+   --  or has any parameters of limited types.
 
    --  Wrap thread body
 
@@ -4287,7 +4288,9 @@ package body Exp_Ch6 is
          begin
             F := First_Formal (Spec_Id);
             while Present (F) loop
-               if Is_Descendent_Of_Address (Etype (F)) then
+               if Is_Descendent_Of_Address (Etype (F))
+                 or else Is_Limited_Type (Etype (F))
+               then
                   Set_Is_Pure (Spec_Id, False);
 
                   if Spec_Id /= Body_Id then
index c1954796eed704230418f2b5e4f4f47ffd9974b0..8e72088e36da8eeb2eaf5e4bcd7b4c31c74ea5a9 100644 (file)
@@ -132,7 +132,8 @@ package GNAT.Perfect_Hash_Generators is
    --  attempts (see Initialize).
 
    procedure Produce
-     (Pkg_Name : String := Default_Pkg_Name; Use_Stdout : Boolean := False);
+     (Pkg_Name   : String  := Default_Pkg_Name;
+      Use_Stdout : Boolean := False);
    --  Generate the hash function package Pkg_Name. This package includes the
    --  minimal perfect Hash function. The output is normally placed in the
    --  current directory, in files X.ads and X.adb, where X is the standard
index 180169ef1017c7cf27ae6dfe591e3af640052db7..a8b3b5bec83a5727a2b015e467b7d3310f601a63 100644 (file)
@@ -6208,8 +6208,8 @@ Comments that follow other tokens on a line must have at least one blank
 following the ``@code{--}'' at the start of the comment.
 
 @item
-Full line comments must have two blanks following the ``@code{--}'' that
-starts the comment, with the following exceptions.
+Full line comments must have at least two blanks following the
+``@code{--}'' that starts the comment, with the following exceptions.
 
 @item
 A line consisting only of the ``@code{--}'' characters, possibly preceded
index 159ee83597c936d599902ca203a7c29f25f9f07a..76387b7923c07c7865d305c56aa732df606d1eb9 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2001-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-2010, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -105,12 +105,13 @@ package body Prj.Util is
    -------------------
 
    function Executable_Of
-     (Project  : Project_Id;
-      In_Tree  : Project_Tree_Ref;
-      Main     : File_Name_Type;
-      Index    : Int;
-      Ada_Main : Boolean := True;
-      Language : String := "") return File_Name_Type
+     (Project        : Project_Id;
+      In_Tree        : Project_Tree_Ref;
+      Main           : File_Name_Type;
+      Index          : Int;
+      Ada_Main       : Boolean := True;
+      Language       : String := "";
+      Include_Suffix : Boolean := True) return File_Name_Type
    is
       pragma Assert (Project /= No_Project);
 
@@ -145,6 +146,10 @@ package body Prj.Util is
          S_Suffix : File_Name_Type);
       --  Get the non empty suffixes in variables Spec_Suffix and Body_Suffix
 
+      function Add_Suffix (File : File_Name_Type) return File_Name_Type;
+      --  Return the name of the executable, based on File, and adding the
+      --  executable suffix if needed.
+
       ------------------
       -- Get_Suffixes --
       ------------------
@@ -165,6 +170,29 @@ package body Prj.Util is
          end if;
       end Get_Suffixes;
 
+      ----------------
+      -- Add_Suffix --
+      ----------------
+
+      function Add_Suffix (File : File_Name_Type) return File_Name_Type is
+         Saved_EEOT : constant Name_Id := Executable_Extension_On_Target;
+         Result     : File_Name_Type;
+
+      begin
+         if Include_Suffix then
+            if Executable_Suffix_Name /= No_Name then
+               Executable_Extension_On_Target := Executable_Suffix_Name;
+            end if;
+
+            Result :=  Executable_Name (File_Name_Type (Executable.Value));
+            Executable_Extension_On_Target := Saved_EEOT;
+            return Result;
+
+         else
+            return File;
+         end if;
+      end Add_Suffix;
+
    --  Start of processing for Executable_Of
 
    begin
@@ -237,22 +265,7 @@ package body Prj.Util is
            and then Executable.Value /= No_Name
            and then Length_Of_Name (Executable.Value) /= 0
          then
-            --  Get the executable name. If Executable_Suffix is defined,
-            --  make sure that it will be the extension of the executable.
-
-            declare
-               Saved_EEOT : constant Name_Id := Executable_Extension_On_Target;
-               Result     : File_Name_Type;
-
-            begin
-               if Executable_Suffix_Name /= No_Name then
-                  Executable_Extension_On_Target := Executable_Suffix_Name;
-               end if;
-
-               Result :=  Executable_Name (File_Name_Type (Executable.Value));
-               Executable_Extension_On_Target := Saved_EEOT;
-               return Result;
-            end;
+            return Add_Suffix (File_Name_Type (Executable.Value));
          end if;
       end if;
 
@@ -287,24 +300,7 @@ package body Prj.Util is
          Get_Name_String (Strip_Suffix (Main));
       end if;
 
-      --  Get the executable name. If Executable_Suffix is defined in the
-      --  configuration, make sure that it will be the extension of the
-      --  executable.
-
-      declare
-         Saved_EEOT : constant Name_Id := Executable_Extension_On_Target;
-         Result     : File_Name_Type;
-
-      begin
-         if Project.Config.Executable_Suffix /= No_Name then
-            Executable_Extension_On_Target :=
-              Project.Config.Executable_Suffix;
-         end if;
-
-         Result := Executable_Name (Name_Find);
-         Executable_Extension_On_Target := Saved_EEOT;
-         return Result;
-      end;
+      return Add_Suffix (Name_Find);
    end Executable_Of;
 
    --------------
index 0efdfbb5b03f8500cf793eb9d3ce35e69b7167b0..02d2cea6808c16f867309a5baf99c35d449b68ff 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2001-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-2010, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 
 package Prj.Util is
 
-   --  ??? throughout this spec, parameters are not well enough documented
-
    function Executable_Of
-     (Project  : Project_Id;
-      In_Tree  : Project_Tree_Ref;
-      Main     : File_Name_Type;
-      Index    : Int;
-      Ada_Main : Boolean := True;
-      Language : String := "") return File_Name_Type;
+     (Project        : Project_Id;
+      In_Tree        : Project_Tree_Ref;
+      Main           : File_Name_Type;
+      Index          : Int;
+      Ada_Main       : Boolean := True;
+      Language       : String := "";
+      Include_Suffix : Boolean := True) return File_Name_Type;
    --  Return the value of the attribute Builder'Executable for file Main in
    --  the project Project, if it exists. If there is no attribute Executable
    --  for Main, remove the suffix from Main; then, if the attribute
    --  Executable_Suffix is specified, add this suffix, otherwise add the
    --  standard executable suffix for the platform.
+   --
+   --  If Include_Suffix is true, then the ".exe" suffix (or any suffix defined
+   --  in the config and project files) will be added. Otherwise, such a suffix
+   --  is not added. In particular, the prefix should not be added if you are
+   --  potentially testing for cross-platforms, since the suffix might not be
+   --  known (its default value comes from the ...-gnatmake prefix).
+   --
    --  What is Ada_Main???
    --  What is Language???
 
@@ -60,8 +66,8 @@ package Prj.Util is
    function Value_Of
      (Variable : Variable_Value;
       Default  : String) return String;
-   --  Get the value of a single string variable. If Variable is
-   --  Nil_Variable_Value, is a string list or is defaulted, return Default.
+   --  Get the value of a single string variable. If Variable is a string list,
+   --  is Nil_Variable_Value,or is defaulted, return Default.
 
    function Value_Of
      (Index    : Name_Id;