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] pragma Style_Checks (All_Checks) for -gnatg mode


This patch modifies the behavior of pragma Style_Checks so that if
the argument All_Checks is used in -gnatg (GNAT) mode, then the
result is to set the standard GNAT style check options (-gnatyg)
rather than the normal default style checks (-gnatyy).

The following program is compiled in -gnatg mode:

     1. --  pragma Style_Checks (All_Checks);
     2. package AllChecks is
     3.
        |
        >>> (style) multiple blank lines

     4.
     5. end AllChecks;
     6.
        |
        >>> (style) blank line not allowed at end of file

Previously neither of these two errors was caught

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

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style
	for -gnatg.
	* sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets
	gnat style for -gnatg.
	* gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode.

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]