aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:45:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:45:27 +0200
commit38afef28a3c5af53e3c4e582f8a071f2dca91618 (patch)
tree20e2d444c0696d09f6e8ef992b4bc959dce87426
parenteafedef3836563374ab1c4509e2a386c8156af7f (diff)
downloadgcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.zip
gcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.tar.gz
gcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.tar.bz2
[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
-rw-r--r--gcc/ada/ChangeLog27
-rw-r--r--gcc/ada/checks.adb11
-rw-r--r--gcc/ada/gnat_rm.texi27
-rw-r--r--gcc/ada/prj-ext.adb12
-rw-r--r--gcc/ada/prj-tree.ads8
-rw-r--r--gcc/ada/prj-util.adb7
-rw-r--r--gcc/ada/s-taprop-linux.adb6
-rw-r--r--gcc/ada/s-taskin.ads2
8 files changed, 85 insertions, 15 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9e59c39..66db437 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,30 @@
+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>
* opt.adb (Short_Descriptors): New flag
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 2921260..9b10f12 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -4108,6 +4108,17 @@ package body Checks is
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
Insert_Valid_Check (Expr);
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 09fcb14..15c7f4f 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -186,6 +186,7 @@ Implementation Defined Pragmas
* Pragma Restriction_Warnings::
* Pragma Shared::
* Pragma Short_Circuit_And_Or::
+* Pragma Short_Descriptors::
* Pragma Source_File_Name::
* Pragma Source_File_Name_Project::
* Pragma Source_Reference::
@@ -803,6 +804,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Restriction_Warnings::
* Pragma Shared::
* Pragma Short_Circuit_And_Or::
+* Pragma Short_Descriptors::
* Pragma Source_File_Name::
* Pragma Source_File_Name_Project::
* Pragma Source_Reference::
@@ -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}
and thus is considered part of the implementation. To compile
it you will have to use the appropriate switch for compiling
-system units. @xref{Top, @value{EDITION} User's Guide, About This
-Guide,, gnat_ugn, @value{EDITION} User's Guide}, for details.
+system units.
+@xref{Top, @value{EDITION} User's Guide, About This Guide, gnat_ugn, @value{EDITION} User's Guide},
+for details.
@node Pragma Extensions_Allowed
@unnumberedsec Pragma Extensions_Allowed
@@ -3793,7 +3796,7 @@ type Day is (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
@end smallexample
@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:
@smallexample @c ada
@@ -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.
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
@unnumberedsec Pragma Source_File_Name
@findex Source_File_Name
diff --git a/gcc/ada/prj-ext.adb b/gcc/ada/prj-ext.adb
index d867353..77d3379 100644
--- a/gcc/ada/prj-ext.adb
+++ b/gcc/ada/prj-ext.adb
@@ -250,13 +250,21 @@ package body Prj.Ext is
Prefix := new String'(Executable_Prefix_Path);
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
(Path_Separator & Prefix.all &
"share" & Directory_Separator & "gpr");
Add_Str_To_Name_Buffer
(Path_Separator & Prefix.all &
- Directory_Separator & "lib" &
- Directory_Separator & "gnat");
+ "lib" & Directory_Separator & "gnat");
end if;
else
diff --git a/gcc/ada/prj-tree.ads b/gcc/ada/prj-tree.ads
index fa8c132..e4c9583 100644
--- a/gcc/ada/prj-tree.ads
+++ b/gcc/ada/prj-tree.ads
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -1470,7 +1470,11 @@ package Prj.Tree is
-- project-tree specific so that one can load the same tree twice but
-- 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.
-- 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
diff --git a/gcc/ada/prj-util.adb b/gcc/ada/prj-util.adb
index 62e6e6d..7700b8e 100644
--- a/gcc/ada/prj-util.adb
+++ b/gcc/ada/prj-util.adb
@@ -187,7 +187,7 @@ package body Prj.Util is
Executable_Extension_On_Target := Saved_EEOT;
return Result;
- else
+ elsif Builder_Package /= No_Package then
-- We still want to take into account cases where the suffix is
-- specified in the project itself, as opposed to the config file.
-- Unfortunately, when the project was processed, they are both
@@ -208,11 +208,10 @@ package body Prj.Util is
Result := Executable_Name (File);
Executable_Extension_On_Target := Saved_EEOT;
return Result;
-
- else
- return File;
end if;
end if;
+
+ return File;
end Add_Suffix;
-- Start of processing for Executable_Of
diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb
index 5680fa2..38b4cf6 100644
--- a/gcc/ada/s-taprop-linux.adb
+++ b/gcc/ada/s-taprop-linux.adb
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -717,7 +717,9 @@ package body System.Task_Primitives.Operations is
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
Stack : aliased stack_t;
Result : Interfaces.C.int;
diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads
index 104a3a6..3ec38bb 100644
--- a/gcc/ada/s-taskin.ads
+++ b/gcc/ada/s-taskin.ads
@@ -523,7 +523,7 @@ package System.Tasking is
-- Activator writes it, once, before Self starts executing. Thereafter,
-- 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
--
-- Protection: Only accessed by Self