summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:31:02 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:31:02 +0200
commite5dc610e6dd4695349a09d02e923ac6b45ba0cbb (patch)
treee76c03390d624bc43460270253077c503970e322 /gcc/ada
parent2bc58d4d59d22e8e8dacd5ab60d802e32fd2954c (diff)
downloadgcc-e5dc610e6dd4695349a09d02e923ac6b45ba0cbb.tar.gz
[multiple changes]
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
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/Make-generated.in8
-rw-r--r--gcc/ada/exp_ch6.adb5
-rw-r--r--gcc/ada/g-pehage.ads3
-rw-r--r--gcc/ada/gnat_ugn.texi4
-rw-r--r--gcc/ada/prj-util.adb78
-rw-r--r--gcc/ada/prj-util.ads28
7 files changed, 87 insertions, 56 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6e81788636a..e718fc06ed7 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,22 @@
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
Set_Corresponding_Protected_Entry.
diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in
index 06cb4a21468..6942d7a5fcc 100644
--- a/gcc/ada/Make-generated.in
+++ b/gcc/ada/Make-generated.in
@@ -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)
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 26ce78429c1..a2b6c16a08f 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -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
diff --git a/gcc/ada/g-pehage.ads b/gcc/ada/g-pehage.ads
index c1954796eed..8e72088e36d 100644
--- a/gcc/ada/g-pehage.ads
+++ b/gcc/ada/g-pehage.ads
@@ -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
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 180169ef101..a8b3b5bec83 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -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
diff --git a/gcc/ada/prj-util.adb b/gcc/ada/prj-util.adb
index 159ee83597c..76387b7923c 100644
--- a/gcc/ada/prj-util.adb
+++ b/gcc/ada/prj-util.adb
@@ -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;
--------------
diff --git a/gcc/ada/prj-util.ads b/gcc/ada/prj-util.ads
index 0efdfbb5b03..02d2cea6808 100644
--- a/gcc/ada/prj-util.ads
+++ b/gcc/ada/prj-util.ads
@@ -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- --
@@ -27,20 +27,26 @@
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;