From: charlet Date: Fri, 10 Sep 2010 09:45:27 +0000 (+0000) Subject: 2010-09-10 Emmanuel Briot X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=784d42309d8b27fd886ee74b8b6a6111ec60b85c;p=pf3gnuchains%2Fgcc-fork.git 2010-09-10 Emmanuel Briot * prj-util.adb (Executable_Of): Fix CE when the project does not contain a Builder package. 2010-09-10 Vincent Celier * prj-ext.adb (Initialize_Project_Path): Add /lib/gpr/ 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 * 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 * gnat_rm.texi: Document Short_Descriptors. 2010-09-10 Arnaud Charlet * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164149 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9e59c39fed3..66db4373016 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,30 @@ +2010-09-10 Emmanuel Briot + + * prj-util.adb (Executable_Of): Fix CE when the project does not + contain a Builder package. + +2010-09-10 Vincent Celier + + * prj-ext.adb (Initialize_Project_Path): Add /lib/gpr/ + 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 + + * 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 + + * gnat_rm.texi: Document Short_Descriptors. + +2010-09-10 Arnaud Charlet + + * 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 * opt.adb (Short_Descriptors): New flag diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 29212608372..9b10f126256 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 09fcb145fa4..15c7f4f1636 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 d867353ed33..77d3379a302 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 fa8c132e565..e4c9583e734 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 62e6e6ddd1e..7700b8ec19f 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 5680fa22c76..38b4cf6f53b 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 104a3a68c24..3ec38bbf6c5 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