aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/ali.adb2
-rw-r--r--gcc/ada/exp_attr.adb16
-rw-r--r--gcc/ada/exp_ch9.adb8
-rw-r--r--gcc/ada/init.c10
-rw-r--r--gcc/ada/prj-nmsc.adb48
-rw-r--r--gcc/ada/tbuild.adb2
-rw-r--r--gcc/ada/types.ads2
8 files changed, 56 insertions, 41 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7cc30bb..226fb95 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-28 Robert Dewar <dewar@adacore.com>
+
+ * exp_attr.adb, exp_ch9.adb, prj-nmsc.adb, tbuild.adb, ali.adb,
+ types.ads: Minor reformatting
+
+2009-10-28 Tristan Gingold <gingold@adacore.com>
+
+ * init.c: Fix __gnat_error_handler for Darwin10 (Snow Leopard)
+
2009-10-28 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Perform Integer promotion for
diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb
index b2357ea..20438cf 100644
--- a/gcc/ada/ali.adb
+++ b/gcc/ada/ali.adb
@@ -190,7 +190,7 @@ package body ALI is
function Get_Name
(Ignore_Spaces : Boolean := False;
- Ignore_Special : Boolean := False)return Name_Id;
+ Ignore_Special : Boolean := False) return Name_Id;
-- Skip blanks, then scan out a name (name is left in Name_Buffer with
-- length in Name_Len, as well as being returned in Name_Id form).
-- If Lower is set to True then the Name_Buffer will be converted to
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 67babec..48bd566 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -661,12 +661,10 @@ package body Exp_Attr is
if Is_Protected_Self_Reference (Pref)
and then not
- (Nkind_In (Parent (N),
- N_Index_Or_Discriminant_Constraint,
- N_Discriminant_Association)
- and then
- Nkind (Parent (Parent (Parent (Parent (N)))))
- = N_Component_Definition)
+ (Nkind_In (Parent (N), N_Index_Or_Discriminant_Constraint,
+ N_Discriminant_Association)
+ and then Nkind (Parent (Parent (Parent (Parent (N))))) =
+ N_Component_Definition)
then
Rewrite (Pref, Concurrent_Ref (Pref));
Analyze (Pref);
@@ -690,9 +688,9 @@ package body Exp_Attr is
function Enclosing_Object (N : Node_Id) return Node_Id;
-- If N denotes a compound name (selected component, indexed
- -- component, or slice), returns the name of the outermost
- -- such enclosing object. Otherwise returns N. If the object
- -- is a renaming, then the renamed object is returned.
+ -- component, or slice), returns the name of the outermost such
+ -- enclosing object. Otherwise returns N. If the object is a
+ -- renaming, then the renamed object is returned.
----------------------
-- Enclosing_Object --
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 2079052..e26734e 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -7824,8 +7824,8 @@ package body Exp_Ch9 is
Oent : constant Entity_Id := Defining_Identifier (Priv);
New_Comp : Node_Id;
Nent : constant Entity_Id :=
- Make_Defining_Identifier
- (Sloc (Oent), Chars (Oent));
+ Make_Defining_Identifier (Sloc (Oent),
+ Chars => Chars (Oent));
begin
if Present (Subtype_Indication (Old_Comp)) then
@@ -7846,9 +7846,9 @@ package body Exp_Ch9 is
New_Priv :=
Make_Component_Declaration (Loc,
- Defining_Identifier => Nent,
+ Defining_Identifier => Nent,
Component_Definition => New_Comp,
- Expression => Expression (Priv));
+ Expression => Expression (Priv));
Set_Has_Per_Object_Constraint (Nent,
Has_Per_Object_Constraint (Oent));
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 0483d82..f9bcf63 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -2114,6 +2114,7 @@ __gnat_install_handler(void)
#elif defined(__APPLE__)
#include <signal.h>
+#include <sys/syscall.h>
#include <mach/mach_vm.h>
#include <mach/mach_init.h>
#include <mach/vm_statistics.h>
@@ -2123,9 +2124,9 @@ char __gnat_alternate_stack[32 * 1024]; /* 1 * MINSIGSTKSZ */
static void __gnat_error_handler (int sig, siginfo_t * si, void * uc);
-/* Defined in xnu unix_signal.c */
+/* Defined in xnu unix_signal.c.
+ Tell the kernel to re-use alt stack when delivering a signal. */
#define UC_RESET_ALT_STACK 0x80000000
-extern int sigreturn (void *uc, int flavour);
/* Return true if ADDR is within a stack guard area. */
static int
@@ -2173,8 +2174,9 @@ __gnat_error_handler (int sig, siginfo_t * si, void * uc ATTRIBUTE_UNUSED)
msg = "erroneous memory access";
}
/* Reset the use of alt stack, so that the alt stack will be used
- for the next signal delivery. */
- sigreturn (NULL, UC_RESET_ALT_STACK);
+ for the next signal delivery.
+ The stack can't be used in case of stack checking. */
+ syscall (SYS_sigreturn, NULL, UC_RESET_ALT_STACK);
break;
case SIGFPE:
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 064cbb6..b8d6674 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -4712,7 +4712,7 @@ package body Prj.Nmsc is
(Path_Id : Name_Id;
Display_Path_Id : Name_Id);
-- Add the directory Path_Id to the list of source_dirs if not
- -- already in the list
+ -- already in the list.
procedure Recursive_Find_Dirs (Path : Name_Id);
-- Find all the subdirectories (recursively) of Path and add them
@@ -4731,12 +4731,12 @@ package body Prj.Nmsc is
Rank_List : Number_List_Index;
Prev_Rank : Number_List_Index;
Element : String_Element;
+
begin
Prev := Nil_String;
Prev_Rank := No_Number_List;
List := Project.Source_Dirs;
Rank_List := Project.Source_Dir_Ranks;
-
while List /= Nil_String loop
Element := Data.Tree.String_Elements.Table (List);
exit when Element.Value = Path_Id;
@@ -4782,7 +4782,6 @@ package body Prj.Nmsc is
String_Element_Table.Last (Data.Tree.String_Elements);
Data.Tree.Number_Lists.Table (Last_Src_Dir_Rank).Next :=
Number_List_Table.Last (Data.Tree.Number_Lists);
-
end if;
-- And register this source directory as the new last
@@ -4796,6 +4795,7 @@ package body Prj.Nmsc is
(Number => Rank, Next => No_Number_List);
elsif List /= Nil_String then
+
-- Remove source dir, if present
if Prev = Nil_String then
@@ -4818,9 +4818,10 @@ package body Prj.Nmsc is
-------------------------
procedure Recursive_Find_Dirs (Path : Name_Id) is
- Dir : Dir_Type;
- Name : String (1 .. 250);
- Last : Natural;
+ Dir : Dir_Type;
+ Name : String (1 .. 250);
+ Last : Natural;
+
Non_Canonical_Path : Name_Id := No_Name;
Canonical_Path : Name_Id := No_Name;
@@ -4860,9 +4861,9 @@ package body Prj.Nmsc is
(Path_Id => Canonical_Path,
Display_Path_Id => Non_Canonical_Path);
- -- Now look for subdirectories. We do that even when this
- -- directory is already in the list, because some of its
- -- subdirectories may not be in the list yet.
+ -- Now look for subdirectories. Do that even when this directory
+ -- is already in the list, because some of its subdirectories may
+ -- not be in the list yet.
Open (Dir, The_Path (The_Path'First .. The_Path_Last));
@@ -4882,12 +4883,14 @@ package body Prj.Nmsc is
declare
Path_Name : constant String :=
- Normalize_Pathname
- (Name => Name (1 .. Last),
- Directory =>
- The_Path (The_Path'First .. The_Path_Last),
- Resolve_Links => Opt.Follow_Links_For_Dirs,
- Case_Sensitive => True);
+ Normalize_Pathname
+ (Name => Name (1 .. Last),
+ Directory =>
+ The_Path
+ (The_Path'First .. The_Path_Last),
+ Resolve_Links =>
+ Opt.Follow_Links_For_Dirs,
+ Case_Sensitive => True);
begin
if Is_Directory (Path_Name) then
@@ -5028,13 +5031,14 @@ package body Prj.Nmsc is
else
declare
- Path : constant String :=
- Normalize_Pathname
- (Name => Get_Name_String (Path_Name.Name),
- Directory =>
- Get_Name_String (Project.Directory.Name),
- Resolve_Links => Opt.Follow_Links_For_Dirs,
- Case_Sensitive => True);
+ Path : constant String :=
+ Normalize_Pathname
+ (Name =>
+ Get_Name_String (Path_Name.Name),
+ Directory =>
+ Get_Name_String (Project.Directory.Name),
+ Resolve_Links => Opt.Follow_Links_For_Dirs,
+ Case_Sensitive => True);
Last_Path : constant Natural :=
Compute_Directory_Last (Path);
diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb
index f1004d5..3da3c61 100644
--- a/gcc/ada/tbuild.adb
+++ b/gcc/ada/tbuild.adb
@@ -668,10 +668,12 @@ package body Tbuild is
N_Op_Shift_Right_Arithmetic => Name_Shift_Right_Arithmetic);
Nod : constant Node_Id := New_Node (New_Node_Kind, New_Sloc);
+
begin
if New_Node_Kind in Name_Of'Range then
Set_Chars (Nod, Name_Of (New_Node_Kind));
end if;
+
return Nod;
end New_Op_Node;
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 7340f64..cc3603a 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -31,7 +31,7 @@
-- This package contains host independent type definitions which are used
-- in more than one unit in the compiler. They are gathered here for easy
--- reference, though in some cases the full description is found in the
+-- reference, although in some cases the full description is found in the
-- relevant module which implements the definition. The main reason that they
-- are not in their "natural" specs is that this would cause a lot of inter-
-- spec dependencies, and in particular some awkward circular dependencies