diff options
-rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ada/prj-tree.adb | 48 | ||||
-rw-r--r-- | gcc/ada/prj-tree.ads | 8 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 16 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 5 | ||||
-rw-r--r-- | gcc/ada/xoscons.adb | 6 |
6 files changed, 56 insertions, 36 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3ff802f..3c09dd0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2013-04-23 Robert Dewar <dewar@adacore.com> + + * sem_util.adb, sem_res.adb, prj-tree.adb, prj-tree.ads: Minor + reformatting. + +2013-04-23 Pascal Obry <obry@adacore.com> + + * xoscons.adb: Remove unused use clause, minor code clean-up. + 2013-04-23 Ed Schonberg <schonberg@adacore.com> * sem_util.ads, sem_util.adb: Code cleanup for Is_Expression_Function diff --git a/gcc/ada/prj-tree.adb b/gcc/ada/prj-tree.adb index 8072c9d..c121521 100644 --- a/gcc/ada/prj-tree.adb +++ b/gcc/ada/prj-tree.adb @@ -2,11 +2,11 @@ -- -- -- GNAT COMPILER COMPONENTS -- -- -- --- P R J . T R E E -- +-- P R J . T R E E -- -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2013, 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- -- @@ -279,7 +279,8 @@ package body Prj.Tree is function Case_Insensitive (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Boolean is + In_Tree : Project_Node_Tree_Ref) return Boolean + is begin pragma Assert (Present (Node) @@ -524,7 +525,8 @@ package body Prj.Tree is function Directory_Of (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Path_Name_Type is + In_Tree : Project_Node_Tree_Ref) return Path_Name_Type + is begin pragma Assert (Present (Node) @@ -539,7 +541,8 @@ package body Prj.Tree is function End_Of_Line_Comment (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Name_Id is + In_Tree : Project_Node_Tree_Ref) return Name_Id + is Zone : Project_Node_Id := Empty_Node; begin @@ -960,7 +963,8 @@ package body Prj.Tree is function Follows_Empty_Line (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Boolean is + In_Tree : Project_Node_Tree_Ref) return Boolean + is begin pragma Assert (Present (Node) @@ -1005,14 +1009,14 @@ package body Prj.Tree is ---------------- procedure Initialize - (Self : out Environment; - Flags : Processing_Flags) is + (Self : out Environment; + Flags : Processing_Flags) + is begin -- Do not reset the external references, in case we are reloading a -- project, since we want to preserve the current environment. But we -- still need to ensure that the external references are properly -- initialized. - -- Prj.Ext.Reset (Tree.External); Prj.Ext.Initialize (Self.External); @@ -1025,7 +1029,8 @@ package body Prj.Tree is procedure Initialize_And_Copy (Self : out Environment; - Copy_From : Environment) is + Copy_From : Environment) + is begin Self.Flags := Copy_From.Flags; Prj.Ext.Initialize (Self.External, Copy_From => Copy_From.External); @@ -1079,7 +1084,8 @@ package body Prj.Tree is function Is_Extending_All (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Boolean is + In_Tree : Project_Node_Tree_Ref) return Boolean + is begin pragma Assert (Present (Node) @@ -1096,7 +1102,8 @@ package body Prj.Tree is function Is_Not_Last_In_List (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Boolean is + In_Tree : Project_Node_Tree_Ref) return Boolean + is begin pragma Assert (Present (Node) @@ -1155,7 +1162,8 @@ package body Prj.Tree is function Kind_Of (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Project_Node_Kind is + In_Tree : Project_Node_Tree_Ref) return Project_Node_Kind + is begin pragma Assert (Present (Node)); return In_Tree.Project_Nodes.Table (Node).Kind; @@ -1167,7 +1175,8 @@ package body Prj.Tree is function Location_Of (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Source_Ptr is + In_Tree : Project_Node_Tree_Ref) return Source_Ptr + is begin pragma Assert (Present (Node)); return In_Tree.Project_Nodes.Table (Node).Location; @@ -1179,7 +1188,8 @@ package body Prj.Tree is function Name_Of (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Name_Id is + In_Tree : Project_Node_Tree_Ref) return Name_Id + is begin pragma Assert (Present (Node)); return In_Tree.Project_Nodes.Table (Node).Name; @@ -1207,7 +1217,8 @@ package body Prj.Tree is function Next_Comment (Node : Project_Node_Id; - In_Tree : Project_Node_Tree_Ref) return Project_Node_Id is + In_Tree : Project_Node_Tree_Ref) return Project_Node_Id + is begin pragma Assert (Present (Node) @@ -1648,8 +1659,8 @@ package body Prj.Tree is Follows_Empty_Line => Empty_Line, Is_Followed_By_Empty_Line => False); - -- Otherwise, it is an end of line comment. If there is - -- an end of line node specified, associate the comment with + -- Otherwise, it is an end of line comment. If there is an + -- end of line node specified, associate the comment with -- this node. elsif Present (End_Of_Line_Node) then @@ -2038,7 +2049,6 @@ package body Prj.Tree is (Node : Project_Node_Id; In_Tree : Project_Node_Tree_Ref; To : Project_Node_Id) - is Zone : constant Project_Node_Id := Comment_Zones_Of (Node, In_Tree); begin diff --git a/gcc/ada/prj-tree.ads b/gcc/ada/prj-tree.ads index a164099..0d585a3 100644 --- a/gcc/ada/prj-tree.ads +++ b/gcc/ada/prj-tree.ads @@ -2,11 +2,11 @@ -- -- -- GNAT COMPILER COMPONENTS -- -- -- --- P R J . T R E E -- +-- P R J . T R E E -- -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2013, 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- -- @@ -61,8 +61,8 @@ package Prj.Tree is end record; procedure Initialize - (Self : out Environment; - Flags : Processing_Flags); + (Self : out Environment; + Flags : Processing_Flags); -- Initialize a new environment procedure Initialize_And_Copy diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 7d00399..db6ecf7 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -5376,19 +5376,19 @@ package body Sem_Res is Check_Internal_Protected_Use (N, Nam); - -- Freeze the subprogram name if not in a spec-expression. Note that we - -- freeze procedure calls as well as function calls. Procedure calls are - -- not frozen according to the rules (RM 13.14(14)) because it is - -- impossible to have a procedure call to a non-frozen procedure in pure - -- Ada, but in the code that we generate in the expander, this rule - -- needs extending because we can generate procedure calls that need - -- freezing. + -- Freeze the subprogram name if not in a spec-expression. Note that + -- we freeze procedure calls as well as function calls. Procedure calls + -- are not frozen according to the rules (RM 13.14(14)) because it is + -- impossible to have a procedure call to a non-frozen procedure in + -- pure Ada, but in the code that we generate in the expander, this + -- rule needs extending because we can generate procedure calls that + -- need freezing. -- In Ada 2012, expression functions may be called within pre/post -- conditions of subsequent functions or expression functions. Such -- calls do not freeze when they appear within generated bodies, -- (including the body of another expression function) which would - -- place the freeze node in the wrong scope. An expression function + -- place the freeze node in the wrong scope. An expression function -- is frozen in the usual fashion, by the appearance of a real body, -- or at the end of a declarative part. diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 172721d..199c551 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -8137,8 +8137,9 @@ package body Sem_Util is (Present (Corresponding_Body (Decl)) and then Nkind (Original_Node - (Unit_Declaration_Node (Corresponding_Body (Decl)))) - = N_Expression_Function)); + (Unit_Declaration_Node + (Corresponding_Body (Decl)))) = + N_Expression_Function)); end if; end Is_Expression_Function; diff --git a/gcc/ada/xoscons.adb b/gcc/ada/xoscons.adb index 74b76c9..2aafe08 100644 --- a/gcc/ada/xoscons.adb +++ b/gcc/ada/xoscons.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2008-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2008-2013, 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- -- @@ -55,7 +55,6 @@ with XUtil; use XUtil; procedure XOSCons is use Ada.Strings; - use ASCII; Unit_Name : constant String := Argument (1); Tmpl_Name : constant String := Unit_Name & "-tmplt"; @@ -442,6 +441,7 @@ procedure XOSCons is Ada_Ofile, C_Ofile : Sfile; Current_Line : in out Integer) is + function Get_Value (Name : String) return Int_Value_Type; -- Returns the value of the variable Name @@ -516,7 +516,7 @@ procedure XOSCons is Current_Line := Current_Line + 1; exit when Line (1 .. Last) = "@END_IF"; - if Line (1 .. 4) = "@IF " then + if Last > 4 and then Line (1 .. 4) = "@IF " then Parse_Cond (Line (1 .. Last), Res, Tmpl_File, Ada_Ofile, C_Ofile, Current_Line); |