[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
This commit is contained in:
Arnaud Charlet 2010-09-10 11:31:02 +02:00
parent 2bc58d4d59
commit e5dc610e6d
7 changed files with 87 additions and 56 deletions

View 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

View 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)

View 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

View 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

View 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

View 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;
--------------

View 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- --
@ -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;