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] Strip Switch.C of most of its dependencies


Switch.C had needless dependencies on most of the front end, causing
a circular dependency on Back_End for back ends written in Ada.
This patch cleans up the dependencies through introduction of
a new Warnsw package specifically for warning switches, and by
moving variables related to the preprocessor definitions given
on the command line to Opt. No change in behavior.

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

2011-08-02  Geert Bosch  <bosch@adacore.com>

	* opt.ads
	(Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
	(Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
	* prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
	(Add_Symbol_Definition): Move to switch-c.adb
	(Process_Command_Line_Symbol_Definitions): Adjust references to above.
	* prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
	(Add_Symbol_Definition): Move to switch-c.adb.
	* sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
	* sem_warn.adb
	(Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
	Move to warnsw.adb.
	* sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
	Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
	Move to warnsw.adb.
	* switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
	(Add_Symbol_Definition): Moved from Prepcomp.
	* switch-c.ads: Update copyright notice. Use String_List instead of
	Argument_List, removing dependency on System.OS_Lib.

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]