summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-proc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-05 09:14:03 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-05 09:14:03 +0000
commit4d7f55fe6e5199c3ef41326a5518389e55406246 (patch)
tree6b7ddc50c34ddbeb1b309ce15eebffc982f1f8db /gcc/ada/prj-proc.adb
parentf564e129e8d9ea0a7236644e25487736499580e5 (diff)
downloadgcc-4d7f55fe6e5199c3ef41326a5518389e55406246.tar.gz
2008-08-05 Vincent Celier <celier@adacore.com>
* prj-proc.adb: (Process_Declarative_Items): Skip associative array attribute when index is reserved word "others". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r--gcc/ada/prj-proc.adb72
1 files changed, 37 insertions, 35 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb
index 134f85b8b1c..24d42e40a27 100644
--- a/gcc/ada/prj-proc.adb
+++ b/gcc/ada/prj-proc.adb
@@ -1891,51 +1891,53 @@ package body Prj.Proc is
-- Associative array attribute
else
- -- Get the string index
-
- Get_Name_String
- (Associative_Array_Index_Of
- (Current_Item, From_Project_Node_Tree));
-
- -- Put in lower case, if necessary
-
declare
- Lower : Boolean;
+ 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
- Lower :=
- Case_Insensitive
- (Current_Item, From_Project_Node_Tree);
+ if Index_Name /= All_Other_Names then
+ -- Get the string index
- -- In multi-language mode (gprbuild), the index is
- -- always case insensitive if it does not include
- -- any dot.
+ Get_Name_String
+ (Associative_Array_Index_Of
+ (Current_Item, From_Project_Node_Tree));
- if Get_Mode = Multi_Language and then not Lower then
- for J in 1 .. Name_Len loop
- if Name_Buffer (J) = '.' then
- Lower := False;
- exit;
- end if;
- end loop;
- end if;
+ -- Put in lower case, if necessary
- if Lower then
- GNAT.Case_Util.To_Lower
- (Name_Buffer (1 .. Name_Len));
- end if;
- end;
+ Lower :=
+ Case_Insensitive
+ (Current_Item, From_Project_Node_Tree);
- declare
- The_Array : Array_Id;
+ -- In multi-language mode (gprbuild), the index
+ -- is always case insensitive if it does not
+ -- include any dot.
- The_Array_Element : Array_Element_Id :=
- No_Array_Element;
+ if Get_Mode = Multi_Language
+ and then not Lower
+ then
+ for J in 1 .. Name_Len loop
+ if Name_Buffer (J) = '.' then
+ Lower := False;
+ exit;
+ end if;
+ end loop;
+ end if;
- Index_Name : constant Name_Id := Name_Find;
- -- The name id of the index
+ if Lower then
+ GNAT.Case_Util.To_Lower
+ (Name_Buffer (1 .. Name_Len));
+ end if;
+
+ Index_Name := Name_Find;
+ end if;
- begin
-- Look for the array in the appropriate list
if Pkg /= No_Package then