Commit b7b92f15 by Arnaud Charlet

[multiple changes]

2014-05-21  Robert Dewar  <dewar@adacore.com>

	* prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
	sem_elab.ads: Minor reformatting.
	* erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
	parameter optional.

2014-05-21  Pascal Obry  <obry@adacore.com>

	* prj-dect.adb: Allow package Install in aggregate project.

From-SVN: r210703
parent 0df5ae93
2014-05-21 Robert Dewar <dewar@adacore.com> 2014-05-21 Robert Dewar <dewar@adacore.com>
* prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
sem_elab.ads: Minor reformatting.
* erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
parameter optional.
2014-05-21 Pascal Obry <obry@adacore.com>
* prj-dect.adb: Allow package Install in aggregate project.
2014-05-21 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): * sem_ch13.adb (Analyze_Aspect_Specifications):
Insert_Delayed_Pragma is now used for the case of Attach_Handler. Insert_Delayed_Pragma is now used for the case of Attach_Handler.
* sem_prag.adb: Minor comment improvements. * sem_prag.adb: Minor comment improvements.
......
...@@ -1458,7 +1458,7 @@ package body Erroutc is ...@@ -1458,7 +1458,7 @@ package body Erroutc is
function Warning_Specifically_Suppressed function Warning_Specifically_Suppressed
(Loc : Source_Ptr; (Loc : Source_Ptr;
Msg : String_Ptr; Msg : String_Ptr;
Tag : String) return String_Id Tag : String := "") return String_Id
is is
begin begin
-- Loop through specific warning suppression entries -- Loop through specific warning suppression entries
......
...@@ -557,13 +557,13 @@ package Erroutc is ...@@ -557,13 +557,13 @@ package Erroutc is
function Warning_Specifically_Suppressed function Warning_Specifically_Suppressed
(Loc : Source_Ptr; (Loc : Source_Ptr;
Msg : String_Ptr; Msg : String_Ptr;
Tag : String) return String_Id; Tag : String := "") return String_Id;
-- Determines if given message to be posted at given location is suppressed -- Determines if given message to be posted at given location is suppressed
-- by specific ON/OFF Warnings pragmas specifying this particular message. -- by specific ON/OFF Warnings pragmas specifying this particular message.
-- If the warning is not suppressed then No_String is returned, otherwise -- If the warning is not suppressed then No_String is returned, otherwise
-- the corresponding warning string is returned (or the null string if no -- the corresponding warning string is returned (or the null string if no
-- Warning argument was present in the pragma). Tag is the error message -- Warning argument was present in the pragma). Tag is the error message
-- tag for the message in question. -- tag for the message in question or the null string if there is no tag.
function Warning_Treated_As_Error (Msg : String) return Boolean; function Warning_Treated_As_Error (Msg : String) return Boolean;
-- Returns True if the warning message Msg matches any of the strings -- Returns True if the warning message Msg matches any of the strings
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, 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- --
...@@ -484,8 +484,8 @@ package body Exp_Pakd is ...@@ -484,8 +484,8 @@ package body Exp_Pakd is
Expr : Node_Id) return Node_Id; Expr : Node_Id) return Node_Id;
-- The packed array code does unchecked conversions which in some cases -- The packed array code does unchecked conversions which in some cases
-- may involve non-discrete types with differing sizes. The semantics of -- may involve non-discrete types with differing sizes. The semantics of
-- such conversions is potentially endian dependent, and the effect we -- such conversions is potentially endianness dependent, and the effect
-- want here for such a conversion is to do the conversion in size as -- we want here for such a conversion is to do the conversion in size as
-- though numeric items are involved, and we extend or truncate on the -- though numeric items are involved, and we extend or truncate on the
-- left side. This happens naturally in the little-endian case, but in -- left side. This happens naturally in the little-endian case, but in
-- the big endian case we can get left justification, when what we want -- the big endian case we can get left justification, when what we want
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2013, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2014, 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- --
...@@ -214,8 +214,11 @@ package body Prj.Dect is ...@@ -214,8 +214,11 @@ package body Prj.Dect is
Project_Qualifier_Of (Project, In_Tree); Project_Qualifier_Of (Project, In_Tree);
Name : constant Name_Id := Name_Of (Current_Package, In_Tree); Name : constant Name_Id := Name_Of (Current_Package, In_Tree);
begin begin
if Qualif in Aggregate_Project if (Qualif = Aggregate and then Name /= Snames.Name_Builder)
and then Name /= Snames.Name_Builder or else
(Qualif = Aggregate_Library
and then Name /= Snames.Name_Builder
and then Name /= Snames.Name_Install)
then then
Error_Msg_Name_1 := Name; Error_Msg_Name_1 := Name;
Error_Msg Error_Msg
......
...@@ -906,6 +906,11 @@ package body Prj is ...@@ -906,6 +906,11 @@ package body Prj is
type Empty_State is null record; type Empty_State is null record;
No_State : Empty_State; No_State : Empty_State;
-- This is needed for the State parameter of procedure Look_For_Sources
-- below, because of the instantiation For_Imported_Projects of generic
-- procedure For_Every_Project_Imported. As procedure Look_For_Sources
-- does not modify parameter State, there is no need to give its type
-- more than one value.
procedure Look_For_Sources procedure Look_For_Sources
(Proj : Project_Id; (Proj : Project_Id;
......
...@@ -1534,13 +1534,19 @@ package Prj is ...@@ -1534,13 +1534,19 @@ package Prj is
In_Imported_Only : Boolean := False; In_Imported_Only : Boolean := False;
In_Extended_Only : Boolean := False; In_Extended_Only : Boolean := False;
Base_Name : File_Name_Type; Base_Name : File_Name_Type;
Index : Int := 0) return Source_Ids; Index : Int := 0) return Source_Ids;
-- Find all source files with the given name. -- Find all source files with the given name:
-- If In_Extended_Only is True, it will search in project and the project --
-- it extends, but not in the imported projects. -- If In_Extended_Only is True, it will search in project and the project
-- Elsif In_Imported_Only is True, it will search in project and the -- it extends, but not in the imported projects.
-- projects it imports, but not in the others or in aggregated projects. --
-- Else it searches in the whole tree. -- If Extended_Only is False, and In_Imported_Only is True, it will
-- search in project and the projects it imports, but not in the others
-- or in aggregated projects.
--
-- If both Extended_Only and In_Imported_Only are False (the default)
-- then it searches the whole tree.
--
-- If Index is specified, this only search for sources with that index. -- If Index is specified, this only search for sources with that index.
----------------------- -----------------------
......
...@@ -8207,9 +8207,9 @@ package body Sem_Ch12 is ...@@ -8207,9 +8207,9 @@ package body Sem_Ch12 is
while Scop /= Standard_Standard loop while Scop /= Standard_Standard loop
if Scop = Subp then if Scop = Subp then
return True; return True;
else
Scop := Scope (Scop);
end if; end if;
Scop := Scope (Scop);
end loop; end loop;
return False; return False;
...@@ -8257,10 +8257,10 @@ package body Sem_Ch12 is ...@@ -8257,10 +8257,10 @@ package body Sem_Ch12 is
-- the generic body appears textually later, and the generic body is -- the generic body appears textually later, and the generic body is
-- also in the main unit. -- also in the main unit.
-- If instance is nested within a subprogram, and the generic body is -- If instance is nested within a subprogram, and the generic body
-- not, the instance is delayed because the enclosing body is. If -- is not, the instance is delayed because the enclosing body is. If
-- instance and body are within the same scope, or the same sub- -- instance and body are within the same scope, or the same subprogram
-- program body, indicate explicitly that the instance is delayed. -- body, indicate explicitly that the instance is delayed.
Must_Delay := Must_Delay :=
(Gen_Unit = Act_Unit (Gen_Unit = Act_Unit
...@@ -8308,14 +8308,14 @@ package body Sem_Ch12 is ...@@ -8308,14 +8308,14 @@ package body Sem_Ch12 is
-- package Inst is new ... -- package Inst is new ...
-- In this particular scenario, the freeze node for Inst must -- In this particular scenario, the freeze node for Inst must
-- be inserted in the same manner as that of Parent_Inst - -- be inserted in the same manner as that of Parent_Inst,
-- before the next source body or at the end of the declarative -- before the next source body or at the end of the declarative
-- list (body not available). If body P did not exist and -- list (body not available). If body P did not exist and
-- Parent_Inst was frozen after Inst, either by a body -- Parent_Inst was frozen after Inst, either by a body
-- following Inst or at the end of the declarative region, the -- following Inst or at the end of the declarative region,
-- freeze node for Inst must be inserted after that of -- the freeze node for Inst must be inserted after that of
-- Parent_Inst. This relation is established by comparing the -- Parent_Inst. This relation is established by comparing
-- Slocs of Parent_Inst freeze node and Inst. -- the Slocs of Parent_Inst freeze node and Inst.
if List_Containing (Get_Package_Instantiation_Node (Par)) = if List_Containing (Get_Package_Instantiation_Node (Par)) =
List_Containing (N) List_Containing (N)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1997-2012, Free Software Foundation, Inc. -- -- Copyright (C) 1997-2014, 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- --
...@@ -158,7 +158,7 @@ package Sem_Elab is ...@@ -158,7 +158,7 @@ package Sem_Elab is
-- not be generated (see detailed description in body). -- not be generated (see detailed description in body).
procedure Check_Task_Activation (N : Node_Id); procedure Check_Task_Activation (N : Node_Id);
-- at the point at which tasks are activated in a package body, check -- Tt the point at which tasks are activated in a package body, check
-- that the bodies of the tasks are elaborated. -- that the bodies of the tasks are elaborated.
end Sem_Elab; end Sem_Elab;
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