[multiple changes]

2011-09-02  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb: (Find_Sources): When the list of sources is
	explicitly declared in an extending project, do not warn if a source
	for an inherited naming exception is not found.

2011-09-02  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
	expansion is inactive.

2011-09-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Note_Possible_Modification): If the entity
	being modified is the renaming generated for an Ada2012 iterator
	element, the enclosing container or array is modified as well.

From-SVN: r178433
This commit is contained in:
Arnaud Charlet 2011-09-02 08:51:46 +02:00
parent 2ba1a7c7e8
commit c6d5d1acc4
4 changed files with 49 additions and 6 deletions

View File

@ -1,3 +1,20 @@
2011-09-02 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb: (Find_Sources): When the list of sources is
explicitly declared in an extending project, do not warn if a source
for an inherited naming exception is not found.
2011-09-02 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
expansion is inactive.
2011-09-02 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Note_Possible_Modification): If the entity
being modified is the renaming generated for an Ada2012 iterator
element, the enclosing container or array is modified as well.
2011-09-02 Jose Ruiz <ruiz@adacore.com>
* s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,

View File

@ -6779,6 +6779,18 @@ package body Exp_Ch6 is
Function_Id : Entity_Id;
begin
-- Return False when the expander is inactive, since awareness of
-- build-in-place treatment is only relevant during expansion. Note that
-- Is_Build_In_Place_Function, which is called as part of this function,
-- is also conditioned this way, but we need to check here as well to
-- avoid blowing up on processing protected calls when expansion is
-- disabled (such as with -gnatc) since those would trip over the raise
-- of Program_Error below.
if not Expander_Active then
return False;
end if;
-- Step past qualification or unchecked conversion (the latter can occur
-- in cases of calls to 'Input).

View File

@ -6352,12 +6352,14 @@ package body Prj.Nmsc is
No_Name_Location);
Remove_Source (Data.Tree, Source, No_Source);
if Source.Naming_Exception = Yes then
Error_Msg_Name_1 := Name_Id (Source.File);
Error_Msg
(Data.Flags,
"? unknown source file %%",
NL.Location,
Project.Project);
end if;
Again := True;
exit Source_Loop;

View File

@ -10711,6 +10711,18 @@ package body Sem_Util is
then
Exp := Renamed_Object (Ent);
goto Continue;
-- The expression may be the renaming of a subcomponent of an
-- array or container. The assignment to the subcomponent is
-- a modification of the container.
elsif Comes_From_Source (Original_Node (Exp))
and then
Nkind_In (Original_Node (Exp),
N_Selected_Component, N_Indexed_Component)
then
Exp := Prefix (Original_Node (Exp));
goto Continue;
end if;
-- Generate a reference only if the assignment comes from