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] Switches used when invoking an ASIS tool from the GNAT driver


This patch makes the GNAT driver conforming to its documentation:
when there is only one source file specified, the tool package understand
Switches (<source>) and the attribute Switches is specified for the
source file, then these switches are used, not Default_Switches ("Ada").

With this project file:

project Gnatpp_Example is

  for Source_Dirs use (".");
  for Object_Dir use ".";
  for Main use ("main.adb");

  package Pretty_Printer is
     for Default_Switches ("ada") use ("-kU");
     for Switches ("main.adb") use ("-kL");
  end Pretty_Printer;

end Gnatpp_Example;

invoking
  gnat pp -Pgnatpp_example.gpr main.adb
should result in a file with the keywords in ower case.

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

2010-01-27  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb: When there is only one main specified, the package
	support Switches (<main>) and attribute Switches is specified for the
	main, use these switches, instead of Default_Switches ("Ada").

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]