Commit 215aeb67 by Vincent Celier Committed by Arnaud Charlet

2008-08-05 Vincent Celier <celier@adacore.com>

	* prj-proc.adb:
	(Process_Declarative_Items): Skip associative array attribute when index
	is reserved word "others".

From-SVN: r138681
parent 646acd10
...@@ -1891,6 +1891,18 @@ package body Prj.Proc is ...@@ -1891,6 +1891,18 @@ package body Prj.Proc is
-- Associative array attribute -- Associative array attribute
else else
declare
Index_Name : Name_Id :=
Associative_Array_Index_Of
(Current_Item, From_Project_Node_Tree);
Lower : Boolean;
The_Array : Array_Id;
The_Array_Element : Array_Element_Id :=
No_Array_Element;
begin
if Index_Name /= All_Other_Names then
-- Get the string index -- Get the string index
Get_Name_String Get_Name_String
...@@ -1899,19 +1911,17 @@ package body Prj.Proc is ...@@ -1899,19 +1911,17 @@ package body Prj.Proc is
-- Put in lower case, if necessary -- Put in lower case, if necessary
declare
Lower : Boolean;
begin
Lower := Lower :=
Case_Insensitive Case_Insensitive
(Current_Item, From_Project_Node_Tree); (Current_Item, From_Project_Node_Tree);
-- In multi-language mode (gprbuild), the index is -- In multi-language mode (gprbuild), the index
-- always case insensitive if it does not include -- is always case insensitive if it does not
-- any dot. -- include any dot.
if Get_Mode = Multi_Language and then not Lower then if Get_Mode = Multi_Language
and then not Lower
then
for J in 1 .. Name_Len loop for J in 1 .. Name_Len loop
if Name_Buffer (J) = '.' then if Name_Buffer (J) = '.' then
Lower := False; Lower := False;
...@@ -1924,18 +1934,10 @@ package body Prj.Proc is ...@@ -1924,18 +1934,10 @@ package body Prj.Proc is
GNAT.Case_Util.To_Lower GNAT.Case_Util.To_Lower
(Name_Buffer (1 .. Name_Len)); (Name_Buffer (1 .. Name_Len));
end if; end if;
end;
declare
The_Array : Array_Id;
The_Array_Element : Array_Element_Id := Index_Name := Name_Find;
No_Array_Element; end if;
Index_Name : constant Name_Id := Name_Find;
-- The name id of the index
begin
-- Look for the array in the appropriate list -- Look for the array in the appropriate list
if Pkg /= No_Package then if Pkg /= No_Package then
......
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