This is the mail archive of the 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] Add switch to output reason why spec requires body

The warning switch -gnatw.y(.Y) activates(deactivates) a mode in which
information messages are given that show why a package spec requires a
body. This can be useful if you have a large package which unexpectedly
requires a body.

     1. package ReqBody is
        >>> info: "ReqBody" requires body (Elaborate_Body)

     2.    pragma Elaborate_Body;
     3.    A : Integer;
     4.    B : Integer;
     5.    procedure K;
        >>> info: "ReqBody" requires body ("K" requires completion)

     6. end ReqBody;

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

2013-10-17  Robert Dewar  <>

	* gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
	* (List_Body_Required_Info): New flag.
	* prep.adb: Minor reformatting.
	* sem_ch7.adb (Unit_Requires_Body_Info): New
	procedure (Analyze_Package_Specification): Add call to
	* ug_words: Add entries for -gnatw.y and -gnatw.Y.
	* usage.adb: Add line for new warning switch -gnatw.y/.Y.
	* Add entry for [NO_]WHY_SPEC_NEEDS_BODY warning
	*, warnsw.adb: Implement new warning switch -gnatw.y/.Y.

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]