Commit 38afef28 by Arnaud Charlet

[multiple changes]

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

	* prj-util.adb (Executable_Of): Fix CE when the project does not
	contain a Builder package.

2010-09-10  Vincent Celier  <celier@adacore.com>

	* prj-ext.adb (Initialize_Project_Path): Add <prefix>/lib/gpr/<target>
	to the project path, if Prefix and Target_Name are defined.
	* prj-tree.ads (Project_Node_Tree_Data): New component Target_Name

2010-09-10  Ed Schonberg  <schonberg@adacore.com>

	* checks.adb (Ensure_Valid): If the expression is a boolean expression
	or short-circuit operation, do no emit a validity check: only the
	elementary operands of the expression need checking.

2010-09-10  Ben Brosgol  <brosgol@adacore.com>

	* gnat_rm.texi: Document Short_Descriptors.

2010-09-10  Arnaud Charlet  <charlet@adacore.com>

	* s-taprop-linux.adb, s-taskin.ads (Task_Alternate_Stack): Default
	initialize to Null_Address.
	(Enter_Task): Do not set up an alternate stack for foreign threads.

From-SVN: r164149
parent eafedef3
2010-09-10 Emmanuel Briot <briot@adacore.com>
* prj-util.adb (Executable_Of): Fix CE when the project does not
contain a Builder package.
2010-09-10 Vincent Celier <celier@adacore.com>
* prj-ext.adb (Initialize_Project_Path): Add <prefix>/lib/gpr/<target>
to the project path, if Prefix and Target_Name are defined.
* prj-tree.ads (Project_Node_Tree_Data): New component Target_Name
2010-09-10 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Ensure_Valid): If the expression is a boolean expression
or short-circuit operation, do no emit a validity check: only the
elementary operands of the expression need checking.
2010-09-10 Ben Brosgol <brosgol@adacore.com>
* gnat_rm.texi: Document Short_Descriptors.
2010-09-10 Arnaud Charlet <charlet@adacore.com>
* s-taprop-linux.adb, s-taskin.ads (Task_Alternate_Stack): Default
initialize to Null_Address.
(Enter_Task): Do not set up an alternate stack for foreign threads.
2010-09-10 Robert Dewar <dewar@adacore.com> 2010-09-10 Robert Dewar <dewar@adacore.com>
* opt.adb (Short_Descriptors): New flag * opt.adb (Short_Descriptors): New flag
......
...@@ -4108,6 +4108,17 @@ package body Checks is ...@@ -4108,6 +4108,17 @@ package body Checks is
end if; end if;
end if; end if;
-- If this is a boolean expression, only its elementary consituents
-- need checking: if they are valid, a boolean or short-circuit
-- operation with them will be valid as well.
if Base_Type (Typ) = Standard_Boolean
and then
(Nkind (Expr) in N_Op or else Nkind (Expr) in N_Short_Circuit)
then
return;
end if;
-- If we fall through, a validity check is required -- If we fall through, a validity check is required
Insert_Valid_Check (Expr); Insert_Valid_Check (Expr);
......
...@@ -186,6 +186,7 @@ Implementation Defined Pragmas ...@@ -186,6 +186,7 @@ Implementation Defined Pragmas
* Pragma Restriction_Warnings:: * Pragma Restriction_Warnings::
* Pragma Shared:: * Pragma Shared::
* Pragma Short_Circuit_And_Or:: * Pragma Short_Circuit_And_Or::
* Pragma Short_Descriptors::
* Pragma Source_File_Name:: * Pragma Source_File_Name::
* Pragma Source_File_Name_Project:: * Pragma Source_File_Name_Project::
* Pragma Source_Reference:: * Pragma Source_Reference::
...@@ -803,6 +804,7 @@ consideration, the use of these pragmas should be minimized. ...@@ -803,6 +804,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Restriction_Warnings:: * Pragma Restriction_Warnings::
* Pragma Shared:: * Pragma Shared::
* Pragma Short_Circuit_And_Or:: * Pragma Short_Circuit_And_Or::
* Pragma Short_Descriptors::
* Pragma Source_File_Name:: * Pragma Source_File_Name::
* Pragma Source_File_Name_Project:: * Pragma Source_File_Name_Project::
* Pragma Source_Reference:: * Pragma Source_Reference::
...@@ -2208,8 +2210,9 @@ you can construct your own extension unit following the above ...@@ -2208,8 +2210,9 @@ you can construct your own extension unit following the above
definition. Note that such a package is a child of @code{System} definition. Note that such a package is a child of @code{System}
and thus is considered part of the implementation. To compile and thus is considered part of the implementation. To compile
it you will have to use the appropriate switch for compiling it you will have to use the appropriate switch for compiling
system units. @xref{Top, @value{EDITION} User's Guide, About This system units.
Guide,, gnat_ugn, @value{EDITION} User's Guide}, for details. @xref{Top, @value{EDITION} User's Guide, About This Guide, gnat_ugn, @value{EDITION} User's Guide},
for details.
@node Pragma Extensions_Allowed @node Pragma Extensions_Allowed
@unnumberedsec Pragma Extensions_Allowed @unnumberedsec Pragma Extensions_Allowed
...@@ -3793,7 +3796,7 @@ type Day is (Mon, Tue, Wed, Thu, Fri, Sat, Sun); ...@@ -3793,7 +3796,7 @@ type Day is (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
@end smallexample @end smallexample
@noindent @noindent
then the ordering imposed by the language is reasonable, and then the ordering imposed by the language is reasonable, and
clients can depend on it, writing for example: clients can depend on it, writing for example:
@smallexample @c ada @smallexample @c ada
...@@ -4430,7 +4433,23 @@ short-circuited logical operators. If this configuration pragma occurs locally ...@@ -4430,7 +4433,23 @@ short-circuited logical operators. If this configuration pragma occurs locally
within the file being compiled, it applies only to the file being compiled. within the file being compiled, it applies only to the file being compiled.
There is no requirement that all units in a partition use this option. There is no requirement that all units in a partition use this option.
semantics are identical to pragma Atomic. @node Pragma Short_Descriptors
@unnumberedsec Pragma Short_Descriptors
@findex Short_Descriptors
@noindent
Syntax:
@smallexample @c ada
pragma Short_Descriptors
@end smallexample
@noindent
In VMS versions of the compiler, this configuration pragma causes all
occurrences of the mechanism types Descriptor[_xxx] to be treated as
Short_Descriptor[_xxx]. This is helpful in porting legacy applications from a
32-bit environment to a 64-bit environment. This pragma is ignored for non-VMS
versions.
@node Pragma Source_File_Name @node Pragma Source_File_Name
@unnumberedsec Pragma Source_File_Name @unnumberedsec Pragma Source_File_Name
@findex Source_File_Name @findex Source_File_Name
......
...@@ -250,13 +250,21 @@ package body Prj.Ext is ...@@ -250,13 +250,21 @@ package body Prj.Ext is
Prefix := new String'(Executable_Prefix_Path); Prefix := new String'(Executable_Prefix_Path);
if Prefix.all /= "" then if Prefix.all /= "" then
if Tree.Target_Name /= null and then
Tree.Target_Name.all /= ""
then
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all &
"lib" & Directory_Separator & "gpr" &
Directory_Separator & Tree.Target_Name.all);
end if;
Add_Str_To_Name_Buffer Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & (Path_Separator & Prefix.all &
"share" & Directory_Separator & "gpr"); "share" & Directory_Separator & "gpr");
Add_Str_To_Name_Buffer Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all & (Path_Separator & Prefix.all &
Directory_Separator & "lib" & "lib" & Directory_Separator & "gnat");
Directory_Separator & "gnat");
end if; end if;
else else
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1470,7 +1470,11 @@ package Prj.Tree is ...@@ -1470,7 +1470,11 @@ package Prj.Tree is
-- project-tree specific so that one can load the same tree twice but -- project-tree specific so that one can load the same tree twice but
-- have two views of it, for instance. -- have two views of it, for instance.
Project_Path : String_Access; Target_Name : String_Access := null;
-- The target name, if any, specified with the gprbuild or gprclean
-- switch --target=.
Project_Path : String_Access := null;
-- The project path, manipulated through subprograms in prj-ext.ads. -- The project path, manipulated through subprograms in prj-ext.ads.
-- As a special case, if the first character is '#:" or this variable is -- As a special case, if the first character is '#:" or this variable is
-- unset, this means that the PATH has not been fully initialized yet -- unset, this means that the PATH has not been fully initialized yet
......
...@@ -187,7 +187,7 @@ package body Prj.Util is ...@@ -187,7 +187,7 @@ package body Prj.Util is
Executable_Extension_On_Target := Saved_EEOT; Executable_Extension_On_Target := Saved_EEOT;
return Result; return Result;
else elsif Builder_Package /= No_Package then
-- We still want to take into account cases where the suffix is -- We still want to take into account cases where the suffix is
-- specified in the project itself, as opposed to the config file. -- specified in the project itself, as opposed to the config file.
-- Unfortunately, when the project was processed, they are both -- Unfortunately, when the project was processed, they are both
...@@ -208,11 +208,10 @@ package body Prj.Util is ...@@ -208,11 +208,10 @@ package body Prj.Util is
Result := Executable_Name (File); Result := Executable_Name (File);
Executable_Extension_On_Target := Saved_EEOT; Executable_Extension_On_Target := Saved_EEOT;
return Result; return Result;
else
return File;
end if; end if;
end if; end if;
return File;
end Add_Suffix; end Add_Suffix;
-- Start of processing for Executable_Of -- Start of processing for Executable_Of
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -717,7 +717,9 @@ package body System.Task_Primitives.Operations is ...@@ -717,7 +717,9 @@ package body System.Task_Primitives.Operations is
Specific.Set (Self_ID); Specific.Set (Self_ID);
if Use_Alternate_Stack then if Use_Alternate_Stack
and then Self_ID.Common.Task_Alternate_Stack /= Null_Address
then
declare declare
Stack : aliased stack_t; Stack : aliased stack_t;
Result : Interfaces.C.int; Result : Interfaces.C.int;
......
...@@ -523,7 +523,7 @@ package System.Tasking is ...@@ -523,7 +523,7 @@ package System.Tasking is
-- Activator writes it, once, before Self starts executing. Thereafter, -- Activator writes it, once, before Self starts executing. Thereafter,
-- Self only reads it. -- Self only reads it.
Task_Alternate_Stack : System.Address; Task_Alternate_Stack : System.Address := System.Null_Address;
-- The address of the alternate signal stack for this task, if any -- The address of the alternate signal stack for this task, if any
-- --
-- Protection: Only accessed by Self -- Protection: Only accessed by Self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment