This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Allow Switches (others) in project files


It is now possible, for associative array attributes Switches to
use the reserved word "others" as the index. The value of Switches
(others) is taken into account if no other attribute Switches with
a literal string applies.

Tested on i686-pc-linux-gnu, committed on trunk

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

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]