Commit a2ad1f79 by Robert Dewar Committed by Arnaud Charlet

gnat_ugn.texi: Dcoument new rules for style check comment alignment Document that suffixes may...

2007-12-06  Robert Dewar  <dewar@adacore.com>
	    Bob Duff  <duff@adacore.com>

	* gnat_ugn.texi: Dcoument new rules for style check comment alignment
	Document that suffixes may be terminations of each others
	Add doc for -gnatw.a and -gnatw.A
	Document gnatbind -Wx switch
	Document BOM recognition
	Document pragma Implemented_By_Entry.
	Document new units.

	* gnat_rm.texi: (Favor_Top_Level): Document new pragma.
	Add doc for pragma Unreferenced suppressing no entities referenced msg
	Add documentation of GNAT.Directory_Operations.Iteration
	Add documentation of GNAT.Random_Numbers
	Add documentation for pragma Shared.
	Correct documentation for Bit_Order
	Add documentation for the Pool_Address attribute.
	Fix and improve documentation of pragma machine_attribute.
	New pragma Fast_Math
	Document BOM recognition

	* vms_data.ads: Add entries for -gnatw.a -gnatw.A
	Add /Wide_Character_Encoding for binder
	Add qualifier for the new gnatpp option --no-separate-loop-then

From-SVN: r130872
parent b1c6645b
......@@ -3755,7 +3755,9 @@ Suppresses all back-end inlining, even if other optimization or inlining
switches are set.
This includes suppression of inlining that results
from the use of the pragma @code{Inline_Always}.
See also @option{-gnatn} and @option{-gnatN}.
Any occurrences of pragma @code{Inline} or @code{Inline_Always}
are ignored, and @option{-gnatn} and @option{-gnatN} have no
effect if this switch is present.
@item -fno-strict-aliasing
@cindex @option{-fno-strict-aliasing} (@command{gcc})
......@@ -3907,7 +3909,7 @@ Identifier character set
For details of the possible selections for @var{c},
see @ref{Character Set Control}.
@item ^-gnatI^IGNORE_REP_CLAUSES^
@item ^-gnatI^/IGNORE_REP_CLAUSES^
@cindex @option{^-gnatI^IGNORE_REP_CLAUSES^} (@command{gcc})
Ignore representation clauses. When this switch is used, all
representation clauses are treated as comments. This is useful
......@@ -4215,7 +4217,7 @@ Execute @var{ver} version of the compiler. This is the @command{gcc}
version, not the GNAT version.
@end ifclear
@item ^-w^NO_BACK_END_WARNINGS^
@item ^-w^/NO_BACK_END_WARNINGS^
@cindex @option{-w} (@command{gcc})
Turn off warnings generated by the back end of the compiler. Use of
this switch also causes the default for front end warnings to be set
......@@ -4583,6 +4585,9 @@ Out-of-range values being assigned
Possible order of elaboration problems
@item
Assertions (pragma Assert) that are sure to fail
@item
Unreachable code
@item
......@@ -4735,6 +4740,22 @@ This switch suppresses all optional warning messages, see remaining list
in this section for details on optional warning messages that can be
individually controlled.
@item -gnatw.a
@emph{Activate warnings on failing assertions.}
@cindex @option{-gnatw.a} (@command{gcc})
@cindex Assert failures
This switch activates warnings for assertions where the compiler can tell at
compile time that the assertion will fail. Note that this warning is given
even if assertions are disabled. The default is that such warnings are
generated.
@item -gnatw.A
@emph{Suppress warnings on failing assertions.}
@cindex @option{-gnatw.A} (@command{gcc})
@cindex Assert failures
This switch suppresses warnings for assertions where the compiler can tell at
compile time that the assertion will fail.
@item -gnatwb
@emph{Activate warnings on bad fixed values.}
@cindex @option{-gnatwb} (@command{gcc})
......@@ -5642,7 +5663,9 @@ indentation level required.
The general style of required indentation is as specified by
the examples in the Ada Reference Manual. Full line comments must be
aligned with the @code{--} starting on a column that is a multiple of
the alignment level.
the alignment level, or they may be aligned the same way as the following
non-blank line (this is useful when full line comments appear in the middle
of a statement.
@item ^a^ATTRIBUTE^
@emph{Check attribute casing.}
......@@ -6438,8 +6461,13 @@ used, it must be used consistently throughout the program. However,
since brackets encoding is always recognized, it may be conveniently
used in standard libraries, allowing these libraries to be used with
any of the available coding schemes.
scheme. If no @option{-gnatW?} parameter is present, then the default
representation is Brackets encoding only.
scheme.
If no @option{-gnatW?} parameter is present, then the default
representation is normally Brackets encoding only. However, if the
first three characters of the file are 16#EF# 16#BB# 16#BF# (the standard
byte order mark or BOM for UTF-8), then these three characters are
skipped and the default representation for the file is set to UTF-8.
Note that the wide character representation that is specified (explicitly
or by default) for the main program also acts as the default encoding used
......@@ -7679,6 +7707,10 @@ All warning messages are suppressed
Warning messages are treated as fatal errors
@end ifset
@item ^-Wx^/WIDE_CHARACTER_ENCODING=^@var{e}
@cindex @option{^-Wx^/WIDE_CHARACTER_ENCODING^} (@code{gnatbind})
Override default wide character encoding for standard Text_IO files.
@item ^-x^/READ_SOURCES=NONE^
@cindex @option{^-x^/READ_SOURCES^} (@code{gnatbind})
Exclude source files (check object consistency only).
......@@ -7724,6 +7756,16 @@ their consistency. In normal mode, if a source file cannot be located it
is simply ignored. If you specify this switch, a missing source
file is an error.
@item ^-Wx^/WIDE_CHARACTER_ENCODING=^@var{e}
@cindex @option{^-Wx^/WIDE_CHARACTER_ENCODING^} (@code{gnatbind})
Override default wide character encoding for standard Text_IO files.
Normally the default wide character encoding method used for standard
[Wide_[Wide_]]Text_IO files is taken from the encoding specified for
the main source input (see description of switch
@option{^-gnatWx^/WIDE_CHARACTER_ENCODING^} for the compiler). The
use of this switch for the binder (which has the same set of
possible arguments) overrides this default as specified.
@item ^-x^/READ_SOURCES=NONE^
@cindex @option{^-x^/READ_SOURCES=NONE^} (@code{gnatbind})
Exclude source files. In this mode, the binder only checks that ALI
......@@ -8024,7 +8066,11 @@ The following switch is used to bind programs organized in this manner:
Normally the binder checks that the unit name given on the command line
corresponds to a suitable main subprogram. When this switch is used,
a list of ALI files can be given, and the execution of the program
consists of elaboration of these units in an appropriate order.
consists of elaboration of these units in an appropriate order. Note
that the default wide character encoding method for standard Text_IO
files is always set to Brackets if this switch is set (you can use
the binder switch
@option{^-Wx^WIDE_CHARACTER_ENCODING^} to override this default).
@end table
@node Command-Line Access
......@@ -13164,15 +13210,20 @@ conditions:
@itemize @bullet
@item It must not be empty
@item It must include at least one dot
@item It cannot end with the same string as @code{Spec_Suffix ("Ada")}
@item It cannot be the same as @code{Spec_Suffix ("Ada")}
@end itemize
@noindent
If @code{Body_Suffix ("Ada")} and @code{Spec_Suffix ("Ada")} end with the
same string, then a file name that ends with the longest of these two suffixes
will be a body if the longest suffix is @code{Body_Suffix ("Ada")} or a spec
if the longest suffix is @code{Spec_Suffix ("Ada")}.
If @code{Body_Suffix ("Ada")} is not specified, then the default is
@code{"^.adb^.ADB^"}.
@item @var{Separate_Suffix}
This must be a string whose value satisfies the same conditions as
@code{Body_Suffix}.
@code{Body_Suffix}. The same "longest suffix" rules apply.
@noindent
If @code{Separate_Suffix ("Ada")} is not specified, then it defaults to same
......@@ -15523,7 +15574,13 @@ case if the specification occupies more then one line.
@cindex @option{^--separate-loop-then^/SEPARATE_LOOP_THEN^} (@command{gnatpp})
@item ^--separate-loop-then^/SEPARATE_LOOP_THEN^
Place the keyword @code{loop} in FOR and WHILE loop statements and the
keywird @code{then} in IF statements on a separate line.
keyword @code{then} in IF statements on a separate line.
@cindex @option{^--no-separate-loop-then^/NO_SEPARATE_LOOP_THEN^} (@command{gnatpp})
@item ^--no-separate-loop-then^/NO_SEPARATE_LOOP_THEN^
Do not place the keyword @code{loop} in FOR and WHILE loop statements and the
keyw0rd @code{then} in IF statements on a separate line. This option is
incompatible with @option{^--separate-loop-then^/SEPARATE_LOOP_THEN^} option.
@cindex @option{^--use-on-new-line^/USE_ON_NEW_LINE^} (@command{gnatpp})
@item ^--use-on-new-line^/USE_ON_NEW_LINE^
......@@ -622,6 +622,26 @@ package VMS_Data is
"-ws";
-- NODOC (see /WARNINGS)
S_Bind_Wide : aliased constant S := "/WIDE_CHARACTER_ENCODING=" &
"BRACKETS " &
"-gnatWb " &
"HEX " &
"-gnatWh " &
"UPPER " &
"-gnatWu " &
"SHIFT_JIS " &
"-gnatWs " &
"UTF8 " &
"-gnatW8 " &
"EUC " &
"-gnatWe";
-- /NOWIDE_CHARACTER_ENCODING (D)
-- /WIDE_CHARACTER_ENCODING[=encode-type]
--
-- Specifies the mechanism used to encode wide characters, overriding
-- the default as set by the /WIDE_CHARACTER_ENCODING option for the
-- compilation of the main program.
S_Bind_Zero : aliased constant S := "/ZERO_MAIN " &
"-z";
-- /NOZERO_MAIN (D)
......@@ -677,6 +697,7 @@ package VMS_Data is
S_Bind_Verbose 'Access,
S_Bind_Warn 'Access,
S_Bind_WarnX 'Access,
S_Bind_Wide 'Access,
S_Bind_Zero 'Access);
-----------------------------
......@@ -2594,6 +2615,10 @@ package VMS_Data is
"-gnatwA " &
"ALL_GCC " &
"-Wall " &
"FAILING_ASSERTIONS " &
"-gnatw.a " &
"NO_FAILING_ASSERTIONS " &
"-gnatw.A " &
"BAD_FIXED_VALUES " &
"-gnatwb " &
"NO_BAD_FIXED_VALUES " &
......@@ -5261,6 +5286,13 @@ package VMS_Data is
-- Place the THEN keyword in IF statement and the LOOP keyword in for-
-- and while-loops on a separate line.
S_Pretty_N_Sep_Loop_Then : aliased constant S := "/NO_SEPARATE_LOOP_THEN " &
"--no-separate-loop-then";
-- /NO_SEPARATE_LOOP_THEN
--
-- Do not place the THEN keyword in IF statement and the LOOP keyword in
-- for- and while-loops on a separate line.
S_Pretty_Use_On_New_Line : aliased constant S := "/USE_ON_NEW_LINE " &
"--use-on-new-line";
-- /USE_ON_NEW_LINE
......@@ -5617,6 +5649,7 @@ package VMS_Data is
S_Pretty_RTS 'Access,
S_Pretty_Search 'Access,
S_Pretty_Sep_Loop_Then 'Access,
S_Pretty_N_Sep_Loop_Then'Access,
S_Pretty_Use_On_New_Line'Access,
S_Pretty_Stnm_On_Nw_Line'Access,
S_Pretty_Specific 'Access,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment