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] Forbid switch combination in binder


Tested on i686-linux, committed on trunk

This patch eliminates digit switches for the gnatbind debug flag
(-d). These were not used anyway, and it is cleaner not to create
an ambiguity with respect to the new use of -dnnn to specify the
default primary stack size.

The switches for gnatbind could be combined. For example, gnatbind -share
was equivalent to gnatbind -s -h -a -r -e. This was not documented and
caused some surprises for the users. This patch remove this possibility.
The test for this is to invoke gnatbind with -share. It should fails with
an error message similar to:
   gnatbind: invalid switch: -share

2006-02-13  Robert Dewar  <dewar@adacore.com>
	    Vincent Celier  <celier@adacore.com>

	* debug.adb: Eliminate numeric switches for binder/gnatmake

	* switch-m.adb (Normalize_Compiler_Switches): Record numeric debug
	switches for the compiler.
	(Scan_Make_Switches): Do not allow numeric debug switches for gnatmake
	(Scan_Make_Switches): When failing with an illegal switch, output an
	error message with the full switch.
	Eliminate numeric switches for binder/gnatmake

	* switch.ads, switch.adb (Bad_Switch): New procedure

	* switch-b.adb (Scan_Binder_Switches): Do not accept combined switches.
	Remove 0-9 as debug flag character possibilities
	-d is now controlling the primary stack size when its value is a
	positive. Also add checks against invalid values, and support for kb,
	mb. Ditto for -D switch.

Attachment: difs.34
Description: Text document


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