summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-util.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-05 09:14:48 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-05 09:14:48 +0000
commit9c0520cbdfb21501b6f6091813e71a1e25ea8e85 (patch)
treecc13f338881f4b355c6a43a0c3d594d7a2e9ccb1 /gcc/ada/prj-util.adb
parentac0a167c24d418486790da44a7f509fadc372914 (diff)
downloadgcc-9c0520cbdfb21501b6f6091813e71a1e25ea8e85.tar.gz
2008-08-05 Vincent Celier <celier@adacore.com>
* make.adb (Switches_Of): Check for Switches (others), before checking for Default_Switches ("Ada"). (Gnatmake): Use Builder'Switches (others) in preference to Builder'Default_Switches ("Ada") if there are several mains. * prj-attr-pm.adb: (Add_Attribute): Add component Others_Allowed in Attribute_Record aggregate. * prj-attr.adb: Add markers to indicates that attributes Switches allow others as index (Others_Allowed_For): New Boolean function, returning True for attributes with the mark. (Initialize): Recognize optional letter 'O' as the marker for associative array attributes where others is allowed as the index. * prj-attr.ads: (Others_Allowed_For): New Boolean function (Attribute_Record): New Boolean component Others_Allowed * prj-dect.adb: (Parse_Attribute_Declaration): For associative array attribute where others is allowed as the index, allow others as an index. * prj-nmsc.adb: (Process_Binder): Skip associative array attributes with index others (Process_Compiler): Ditto * prj-util.adb: (Value_Of (Index, In_Array)): Make no attempt to put in lower case when index is All_Other_Names. * prj.ads: (All_Other_Names): New constant git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138683 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-util.adb')
-rw-r--r--gcc/ada/prj-util.adb16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/prj-util.adb b/gcc/ada/prj-util.adb
index 2f953a36018..5894e4daf35 100644
--- a/gcc/ada/prj-util.adb
+++ b/gcc/ada/prj-util.adb
@@ -600,9 +600,11 @@ package body Prj.Util is
Real_Index_1 := Index;
if not Element.Index_Case_Sensitive or Force_Lower_Case_Index then
- Get_Name_String (Index);
- To_Lower (Name_Buffer (1 .. Name_Len));
- Real_Index_1 := Name_Find;
+ if Index /= All_Other_Names then
+ Get_Name_String (Index);
+ To_Lower (Name_Buffer (1 .. Name_Len));
+ Real_Index_1 := Name_Find;
+ end if;
end if;
while Current /= No_Array_Element loop
@@ -610,9 +612,11 @@ package body Prj.Util is
Real_Index_2 := Element.Index;
if not Element.Index_Case_Sensitive or Force_Lower_Case_Index then
- Get_Name_String (Element.Index);
- To_Lower (Name_Buffer (1 .. Name_Len));
- Real_Index_2 := Name_Find;
+ if Element.Index /= All_Other_Names then
+ Get_Name_String (Element.Index);
+ To_Lower (Name_Buffer (1 .. Name_Len));
+ Real_Index_2 := Name_Find;
+ end if;
end if;
if Real_Index_1 = Real_Index_2 and then