]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/gnat_ugn.texi
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / gnat_ugn.texi
index f4cae36577ae9a0af5f69cba39ded96a59e165ab..801d87bf959d662ae8b5d87e815285ac91c545c8 100644 (file)
@@ -1,4 +1,4 @@
-f\input texinfo   @c -*-texinfo-*-
+\input texinfo   @c -*-texinfo-*-
 @c %**start of header
 
 @c oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
@@ -18,7 +18,7 @@ Copyright @copyright{} 1995-2009 Free Software Foundation,
 Inc.
 
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with no
 Invariant Sections, with no Front-Cover Texts and with no Back-Cover
 Texts.  A copy of the license is included in the section entitled
@@ -107,6 +107,13 @@ Texts.  A copy of the license is included in the section entitled
 @macro ovar{varname}
 @r{[}@var{\varname\}@r{]}@c
 @end macro
+@c Status as of November 2009:
+@c Unfortunately texi2pdf and texi2html treat the trailing "@c"
+@c differently, and faulty output is produced by one or the other
+@c depending on whether the "@c" is present or absent.
+@c As a result, the @ovar macro is not used, and all invocations
+@c of the @ovar macro have been expanded inline.
+
 
 @settitle @value{EDITION} User's Guide @value{PLATFORM}
 @dircategory GNU Ada tools
@@ -390,8 +397,8 @@ GNAT Project Manager
 
 The Cross-Referencing Tools gnatxref and gnatfind
 
-* gnatxref Switches::
-* gnatfind Switches::
+* Switches for gnatxref::
+* Switches for gnatfind::
 * Project Files for gnatxref and gnatfind::
 * Regular Expressions in gnatfind and gnatxref::
 * Examples of gnatxref Usage::
@@ -492,6 +499,7 @@ Verifying Properties Using gnatcheck
 * Project-Wide Checks::
 * Rule exemption::
 * Predefined Rules::
+* Example of gnatcheck Usage::
 
 Sample Bodies Using gnatstub
 
@@ -596,6 +604,8 @@ Platform-Specific Information for the Run-Time Libraries
 * Linux-Specific Considerations::
 * AIX-Specific Considerations::
 * Irix-Specific Considerations::
+* RTX-Specific Considerations::
+* HP-UX-Specific Considerations::
 
 Example of Binder Output File
 
@@ -3872,7 +3882,9 @@ without generating code, then use the @option{-gnatc} switch.
 The basic command for compiling a file containing an Ada unit is
 
 @smallexample
-$ gcc -c @ovar{switches} @file{file name}
+@c $ gcc -c @ovar{switches} @file{file name}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gcc -c @r{[}@var{switches}@r{]} @file{file name}
 @end smallexample
 
 @noindent
@@ -4418,7 +4430,9 @@ Inhibit the search of the default location for the GNAT Run Time
 Library (RTL) ALI files.
 
 @ifclear vms
-@item -O@ovar{n}
+@c @item -O@ovar{n}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+@item -O@r{[}@var{n}@r{]}
 @cindex @option{-O} (@command{gcc})
 @var{n} controls the optimization level.
 
@@ -4572,8 +4586,9 @@ first in the string.
 
 @item
 The switches
-@option{^-gnatz^/DISTRIBUTION_STUBS^}, @option{-gnatzc}, and @option{-gnatzr}
-may not be combined with any other switches.
+^^@option{/DISTRIBUTION_STUBS=},^
+@option{-gnatzc} and @option{-gnatzr} may not be combined with any other
+switches, and only one of them may appear in the command line.
 
 @ifclear vms
 @item
@@ -4595,6 +4610,10 @@ as warning mode modifiers (see description of @option{-gnatw}).
 Once a ``V'' appears in the string (that is a use of the @option{-gnatV}
 switch), then all further characters in the switch are interpreted
 as validity checking options (@pxref{Validity Checking}).
+
+@item
+Option ``em'', ``ec'', ``ep'', ``l='' and ``R'' must be the last options in
+a combined list of options.
 @end ifclear
 @end itemize
 
@@ -5271,9 +5290,15 @@ implementation unit.
 @item -gnatw.i
 @emph{Activate warnings on overlapping actuals.}
 @cindex @option{-gnatw.i} (@command{gcc})
-This switch enables a warning on statically detectable overlapping actuals
-in a subprogram call, when one of the actuals is an in-out parameter, and
-the types of the actuals are not by-copy types.
+This switch enables a warning on statically detectable overlapping actuals in
+a subprogram call, when one of the actuals is an in-out parameter, and the
+types of the actuals are not by-copy types. The warning is off by default,
+and is not included under -gnatwa.
+
+@item -gnatw.I
+@emph{Disable warnings on overlapping actuals.}
+@cindex @option{-gnatw.I} (@command{gcc})
+This switch disables warnings on overlapping actuals in a call..
 
 @item -gnatwj
 @emph{Activate warnings on obsolescent features (Annex J).}
@@ -7175,7 +7200,9 @@ Shows the storage pool associated with a @code{free} statement.
 Used to list an equivalent declaration for an internally generated
 type that is referenced elsewhere in the listing.
 
-@item freeze @var{type-name} @ovar{actions}
+@c @item freeze @var{type-name} @ovar{actions}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+@item freeze @var{type-name} @r{[}@var{actions}@r{]}
 Shows the point at which @var{type-name} is frozen, with possible
 associated actions to be performed at the freeze point.
 
@@ -7874,7 +7901,9 @@ to be read by the @command{gnatlink} utility used to link the Ada application.
 The form of the @code{gnatbind} command is
 
 @smallexample
-$ gnatbind @ovar{switches} @var{mainprog}@r{[}.ali@r{]} @ovar{switches}
+@c $ gnatbind @ovar{switches} @var{mainprog}@r{[}.ali@r{]} @ovar{switches}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatbind @r{[}@var{switches}@r{]} @var{mainprog}@r{[}.ali@r{]} @r{[}@var{switches}@r{]}
 @end smallexample
 
 @noindent
@@ -8853,8 +8882,12 @@ driver (see @ref{The GNAT Driver and Project Files}).
 The form of the @command{gnatlink} command is
 
 @smallexample
-$ gnatlink @ovar{switches} @var{mainprog}@r{[}.ali@r{]}
-           @ovar{non-Ada objects} @ovar{linker options}
+@c $ gnatlink @ovar{switches} @var{mainprog}@r{[}.ali@r{]}
+@c            @ovar{non-Ada objects} @ovar{linker options}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatlink @r{[}@var{switches}@r{]} @var{mainprog}@r{[}.ali@r{]}
+           @r{[}@var{non-Ada objects}@r{]} @r{[}@var{linker options}@r{]}
+
 @end smallexample
 
 @noindent
@@ -9132,8 +9165,11 @@ dependencies, they will always be tracked exactly correctly by
 The usual form of the @command{gnatmake} command is
 
 @smallexample
-$ gnatmake @ovar{switches} @var{file_name}
-      @ovar{file_names} @ovar{mode_switches}
+@c $ gnatmake @ovar{switches} @var{file_name}
+@c       @ovar{file_names} @ovar{mode_switches}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatmake @r{[}@var{switches}@r{]} @var{file_name}
+      @r{[}@var{file_names}@r{]} @r{[}@var{mode_switches}@r{]}
 @end smallexample
 
 @noindent
@@ -9320,7 +9356,21 @@ This switch cannot be used when using a project file.
 @ifclear vms
 @item -eL
 @cindex @option{-eL} (@command{gnatmake})
+@cindex symbolic links
 Follow all symbolic links when processing project files.
+This should be used if your project uses symbolic links for files or
+directories, but is not needed in other cases.
+
+@cindex naming scheme
+This also assumes that no directory matches the naming scheme for files (for
+instance that you do not have a directory called "sources.ads" when using the
+default GNAT naming scheme).
+
+When you do not have to use this switch (ie by default), gnatmake is able to
+save a lot of system calls (several per source file and object file), which
+can result in a significant speed up to load and manipulate a project file,
+especially when using source files from a remote system.
+
 @end ifclear
 
 @item ^-eS^/STANDARD_OUTPUT_FOR_COMMANDS^
@@ -10689,7 +10739,7 @@ Note that @code{gnatelim} needs neither object nor ALI files.
 @code{gnatelim} has the following command-line interface:
 
 @smallexample
-$ gnatelim @ovar{options} name
+$ gnatelim [@var{options}] name
 @end smallexample
 
 @noindent
@@ -11093,8 +11143,11 @@ in which GNAT processes the ACVC tests.
 The @code{gnatchop} command has the form:
 
 @smallexample
+@c $ gnatchop switches @var{file name} @r{[}@var{file name} @dots{}@r{]}
+@c      @ovar{directory}
+@c Expanding @ovar macro inline (explanation in macro def comments)
 $ gnatchop switches @var{file name} @r{[}@var{file name} @dots{}@r{]}
-      @ovar{directory}
+      @r{[}@var{directory}@r{]}
 @end smallexample
 
 @noindent
@@ -11520,8 +11573,11 @@ set of files.
 The usual form of the @code{gnatname} command is
 
 @smallexample
-$ gnatname @ovar{switches} @var{naming_pattern} @ovar{naming_patterns}
-      @r{[}--and @ovar{switches} @var{naming_pattern} @ovar{naming_patterns}@r{]}
+@c $ gnatname @ovar{switches} @var{naming_pattern} @ovar{naming_patterns}
+@c       @r{[}--and @ovar{switches} @var{naming_pattern} @ovar{naming_patterns}@r{]}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatname @r{[}@var{switches}@r{]} @var{naming_pattern} @r{[}@var{naming_patterns}@r{]}
+      @r{[}--and @r{[}@var{switches}@r{]} @var{naming_pattern} @r{[}@var{naming_patterns}@r{]}@r{]}
 @end smallexample
 
 @noindent
@@ -12694,6 +12750,8 @@ case insensitive. The following package names are legal:
 @item
 @code{Cross_Reference}
 @item
+@code{Check}
+@item
 @code{Eliminate}
 @item
 @code{Pretty_Printer}
@@ -14900,6 +14958,10 @@ package @code{Gnatstub} for command STUB
 @item
 package @code{Linker} for command LINK (invoking @code{^gnatlink^gnatlink^})
 
+@item
+package @code{Check} for command CHECK
+(invoking @code{^gnatcheck^gnatcheck^})
+
 @item
 package @code{Metrics} for command METRIC
 (invoking @code{^gnatmetric^gnatmetric^})
@@ -15357,21 +15419,23 @@ Note: to invoke @code{gnatxref} or @code{gnatfind} with a project file,
 use the @code{gnat} driver (see @ref{The GNAT Driver and Project Files}).
 
 @menu
-* gnatxref Switches::
-* gnatfind Switches::
+* Switches for gnatxref::
+* Switches for gnatfind::
 * Project Files for gnatxref and gnatfind::
 * Regular Expressions in gnatfind and gnatxref::
 * Examples of gnatxref Usage::
 * Examples of gnatfind Usage::
 @end menu
 
-@node gnatxref Switches
+@node Switches for gnatxref
 @section @code{gnatxref} Switches
 
 @noindent
 The command invocation for @code{gnatxref} is:
 @smallexample
-$ gnatxref @ovar{switches} @var{sourcefile1} @r{[}@var{sourcefile2} @dots{}@r{]}
+@c $ gnatxref @ovar{switches} @var{sourcefile1} @r{[}@var{sourcefile2} @dots{}@r{]}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatxref @r{[}@var{switches}@r{]} @var{sourcefile1} @r{[}@var{sourcefile2} @dots{}@r{]}
 @end smallexample
 
 @noindent
@@ -15496,15 +15560,18 @@ appear after the file names. They need not be separated by spaces, thus
 you can say @samp{gnatxref ^-ag^/ALL_FILES/IGNORE_LOCALS^} instead of
 @samp{gnatxref ^-a -g^/ALL_FILES /IGNORE_LOCALS^}.
 
-@node gnatfind Switches
+@node Switches for gnatfind
 @section @code{gnatfind} Switches
 
 @noindent
 The command line for @code{gnatfind} is:
 
 @smallexample
-$ gnatfind @ovar{switches} @var{pattern}@r{[}:@var{sourcefile}@r{[}:@var{line}@r{[}:@var{column}@r{]]]}
-      @r{[}@var{file1} @var{file2} @dots{}]
+@c $ gnatfind @ovar{switches} @var{pattern}@r{[}:@var{sourcefile}@r{[}:@var{line}@r{[}:@var{column}@r{]]]}
+@c       @r{[}@var{file1} @var{file2} @dots{}]
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatfind @r{[}@var{switches}@r{]} @var{pattern}@r{[}:@var{sourcefile}@r{[}:@var{line}@r{[}:@var{column}@r{]]]}
+      @r{[}@var{file1} @var{file2} @dots{}@r{]}
 @end smallexample
 
 @noindent
@@ -16090,7 +16157,9 @@ call @command{gnatpp} through the @command{gnat} driver
 The @command{gnatpp} command has the form
 
 @smallexample
-$ gnatpp @ovar{switches} @var{filename}
+@c $ gnatpp @ovar{switches} @var{filename}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatpp @r{[}@var{switches}@r{]} @var{filename}
 @end smallexample
 
 @noindent
@@ -16606,9 +16675,9 @@ The additional @command{gnatpp} switches are defined in this subsection.
 @item ^-files @var{filename}^/FILES=@var{output_file}^
 @cindex @option{^-files^/FILES^} (@code{gnatpp})
 Take the argument source files from the specified file. This file should be an
-ordinary textual file containing file names separated by spaces or
-line breaks. You can use this switch more then once in the same call to
-@command{gnatpp}. You also can combine this switch with explicit list of
+ordinary text file containing file names separated by spaces or
+line breaks. You can use this switch more than once in the same call to
+@command{gnatpp}. You also can combine this switch with an explicit list of
 files.
 
 @item ^-v^/VERBOSE^
@@ -17192,7 +17261,9 @@ through the @command{gnat} driver.
 The @command{gnatmetric} command has the form
 
 @smallexample
-$ gnatmetric @ovar{switches} @{@var{filename}@} @r{[}-cargs @var{gcc_switches}@r{]}
+@c $ gnatmetric @ovar{switches} @{@var{filename}@} @r{[}-cargs @var{gcc_switches}@r{]}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatmetric @r{[}@var{switches}@r{]} @{@var{filename}@} @r{[}-cargs @var{gcc_switches}@r{]}
 @end smallexample
 
 @noindent
@@ -17287,7 +17358,7 @@ Do not generate the output in text form (implies @option{^-x^/XML^})
 
 @cindex @option{^-d^/DIRECTORY^} (@command{gnatmetric})
 @item ^-d @var{output_dir}^/DIRECTORY=@var{output_dir}^
-Put textual files with detailed metrics into @var{output_dir}
+Put text files with detailed metrics into @var{output_dir}
 
 @cindex @option{^-o^/SUFFIX_DETAILS^} (@command{gnatmetric})
 @item ^-o @var{file_suffix}^/SUFFIX_DETAILS=@var{file_suffix}^
@@ -17864,7 +17935,7 @@ Additional @command{gnatmetric} switches are as follows:
 @cindex @option{^-files^/FILES^} (@code{gnatmetric})
 Take the argument source files from the specified file. This file should be an
 ordinary text file containing file names separated by spaces or
-line breaks. You can use this switch more then once in the same call to
+line breaks. You can use this switch more than once in the same call to
 @command{gnatmetric}. You also can combine this switch with
 an explicit list of files.
 
@@ -17974,7 +18045,9 @@ The @code{gnatkr} command has the form
 
 @ifclear vms
 @smallexample
-$ gnatkr @var{name} @ovar{length}
+@c $ gnatkr @var{name} @ovar{length}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatkr @var{name} @r{[}@var{length}@r{]}
 @end smallexample
 @end ifclear
 
@@ -18162,7 +18235,9 @@ all characters need to be in the ASCII set (no accented letters).
 To call @code{gnatprep} use
 
 @smallexample
-$ gnatprep @ovar{switches} @var{infile} @var{outfile} @ovar{deffile}
+@c $ gnatprep @ovar{switches} @var{infile} @var{outfile} @ovar{deffile}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatprep @r{[}@var{switches}@r{]} @var{infile} @var{outfile} @r{[}@var{deffile}@r{]}
 @end smallexample
 
 @noindent
@@ -20138,7 +20213,9 @@ Solaris and Windows NT/2000/XP (x86).
 The @code{gnatmem} command has the form
 
 @smallexample
-   $ gnatmem @ovar{switches} user_program
+@c    $ gnatmem @ovar{switches} user_program
+@c Expanding @ovar macro inline (explanation in macro def comments)
+      $ gnatmem @r{[}@var{switches}@r{]} @var{user_program}
 @end smallexample
 
 @noindent
@@ -20666,7 +20743,11 @@ driver (see @ref{The GNAT Driver and Project Files}).
 Invoking @command{gnatcheck} on the command line has the form:
 
 @smallexample
-$ gnatcheck @ovar{switches}  @{@var{filename}@}
+@c $ gnatcheck @ovar{switches}  @{@var{filename}@}
+@c       @r{[}^-files^/FILES^=@{@var{arg_list_filename}@}@r{]}
+@c       @r{[}-cargs @var{gcc_switches}@r{]} -rules @var{rule_options}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatcheck @r{[}@var{switches}@r{]}  @{@var{filename}@}
       @r{[}^-files^/FILES^=@{@var{arg_list_filename}@}@r{]}
       @r{[}-cargs @var{gcc_switches}@r{]} -rules @var{rule_options}
 @end smallexample
@@ -20711,6 +20792,7 @@ supplied.
 * Project-Wide Checks::
 * Rule exemption::
 * Predefined Rules::
+* Example of gnatcheck Usage::
 @end menu
 
 @node Format of the Report File
@@ -20852,28 +20934,29 @@ Turn off the check for a specified rule with the specified parameter, if any.
 
 @cindex @option{-from} (@command{gnatcheck})
 @item -from=@var{rule_option_filename}
-Read the rule options from the text file @var{rule_option_filename}, referred as
-``rule file'' below.
+Read the rule options from the text file @var{rule_option_filename}, referred
+to as a ``coding standard file'' below.
 
 @end table
 
 @noindent
 The default behavior is that all the rule checks are disabled.
 
-A rule file is a text file containing a set of rule options.
-@cindex Rule file (for @code{gnatcheck})
+A coding standard file is a text file that contains a set of rule options
+described above.
+@cindex Coding standard file (for @code{gnatcheck})
 The file may contain empty lines and Ada-style comments (comment
-lines and end-of-line comments). The rule file has free format; that is,
-you do not have to start a new rule option on a new line.
+lines and end-of-line comments). There can be several rule options on a
+single line (separated by a space).
 
-A rule file may contain other @option{-from=@var{rule_option_filename}}
+A coding standard file may reference other coding standard files by including
+more @option{-from=@var{rule_option_filename}}
 options, each such option being replaced with the content of the
-corresponding rule file during the rule files processing. In case a
+corresponding coding standard file during processing. In case a
 cycle is detected (that is, @file{@var{rule_file_1}} reads rule options
 from @file{@var{rule_file_2}}, and @file{@var{rule_file_2}} reads
 (directly or indirectly) rule options from @file{@var{rule_file_1}}),
-the processing of rule files is interrupted and a part of their content
-is ignored.
+processing fails with an error message.
 
 
 @node Adding the Results of Compiler Checks to gnatcheck Output
@@ -21007,7 +21090,7 @@ exemption control annotations is as follows:
 @group
 pragma Annotate (gnatcheck, @i{exemption_control}, @i{Rule_Name}, [@i{justification}]);
 
-@i{exemption_control} ::= "Exempt_On" | "Exempt_Off"
+@i{exemption_control} ::= Exempt_On | Exempt_Off
 
 @i{Rule_Name}         ::= string_literal
 
@@ -21031,9 +21114,9 @@ A source code section where an exemption is active for a given rule is
 delimited by an @code{exempt_on} and @code{exempt_off} annotation pair:
 
 @smallexample @c ada
-pragma Annotate (gnatcheck, "Exempt_On", Rule_Name, "justification");
+pragma Annotate (gnatcheck, Exempt_On, Rule_Name, "justification");
 -- source code section
-pragma Annotate (gnatcheck, "Exempt_Off", Rule_Name);
+pragma Annotate (gnatcheck, Exempt_Off, Rule_Name);
 @end smallexample
 
 
@@ -22513,7 +22596,9 @@ This rule has no parameters.
 @cindex @code{Positional_Generic_Parameters} rule (for @command{gnatcheck})
 
 @noindent
-Flag each instantiation using positional parameter notation.
+Flag each positional actual generic parameter except for the case when
+the generic unit being iinstantiated has exactly one generic formal
+parameter.
 
 This rule has no parameters.
 
@@ -22523,15 +22608,15 @@ This rule has no parameters.
 @cindex @code{Positional_Parameters} rule (for @command{gnatcheck})
 
 @noindent
-Flag each subprogram or entry call using positional parameter notation,
+Flag each positional parameter notation in a subprogram or entry call,
 except for the following:
 
 @itemize @bullet
 @item
-Invocations of prefix or infix operators are not flagged
+Parameters of calls to of prefix or infix operators are not flagged
 @item
 If the called subprogram or entry has only one formal parameter,
-the call is not flagged;
+the parameter of the call is not flagged;
 @item
 If a subprogram call uses the @emph{Object.Operation} notation, then
 @itemize @minus
@@ -22905,6 +22990,185 @@ Only variable declarations, and not constant declarations, are checked.
 
 This rule has no parameters.
 
+@node Example of gnatcheck Usage
+@section Example of @command{gnatcheck} Usage
+
+@noindent
+Here is a simple example. Suppose that in the current directory we have a
+project file named @file{gnatcheck_example.gpr} with the following content:
+
+@smallexample @c projectfile
+project Gnatcheck_Example is
+
+   for Source_Dirs use ("src");
+   for Object_Dir use "obj";
+   for Main use ("main.adb");
+
+   package Check is
+      for Default_Switches ("ada") use ("-rules", "-from=coding_standard");
+   end Check;
+
+end Gnatcheck_Example;
+@end smallexample
+
+@noindent
+And the file named @file{coding_standard} is also located in the current
+directory and has the following content:
+
+@smallexample
+-----------------------------------------------------
+-- This is a sample gnatcheck coding standard file --
+-----------------------------------------------------
+
+--  First, turning on rules, that are directly implemented in gnatcheck
++RAbstract_Type_Declarations
++RAnonymous_Arrays
++RLocal_Packages
++RFloat_Equality_Checks
++REXIT_Statements_With_No_Loop_Name
+
+--  Then, activating compiler checks of interest:
++RStyle_Checks:e
+--  This style check checks if a unit name is present on END keyword that
+--  is the end of the unit declaration
+@end smallexample
+
+@noindent
+And the subdirectory @file{src} contains the following Ada sources:
+
+@file{pack.ads}:
+
+@smallexample @c ada
+package Pack is
+   type T is abstract tagged private;
+   procedure P (X : T) is abstract;
+
+   package Inner is
+      type My_Float is digits 8;
+      function Is_Equal (L, R : My_Float) return Boolean;
+   end Inner;
+private
+   type T is abstract tagged null record;
+end;
+@end smallexample
+
+@noindent
+@file{pack.adb}:
+
+@smallexample @c ada
+package body Pack is
+   package body Inner is
+      function Is_Equal (L, R : My_Float) return Boolean is
+      begin
+         return L = R;
+      end;
+   end Inner;
+end Pack;
+@end smallexample
+
+@noindent
+and @file{main.adb}
+
+@smallexample @c ada
+with Pack; use Pack;
+procedure Main is
+
+   pragma Annotate
+     (gnatcheck, Exempt_On, "Anonymous_Arrays", "this one is fine");
+   Float_Array : array (1 .. 10) of Inner.My_Float;
+   pragma Annotate (gnatcheck, Exempt_Off, "Anonymous_Arrays");
+
+   Another_Float_Array : array (1 .. 10) of Inner.My_Float;
+
+   use Inner;
+
+   B : Boolean := False;
+
+begin
+   for J in Float_Array'Range loop
+      if Is_Equal (Float_Array (J), Another_Float_Array (J)) then
+         B := True;
+         exit;
+      end if;
+   end loop;
+end Main;
+@end smallexample
+
+@noindent
+And suppose we call @command{gnatcheck} from the current directory using
+the @command{gnat} driver:
+
+@smallexample
+   gnat check -Pgnatcheck_example.gpr
+@end smallexample
+
+@noindent
+As a result, @command{gnatcheck} is called to check all the files from the
+project @file{gnatcheck_example.gpr} using the coding standard defined by
+the file @file{coding_standard}. As the result, the @command{gnatcheck}
+report file named @file{gnatcheck.out} will be created in the current
+directory, and it will have the following content:
+
+@smallexample
+RULE CHECKING REPORT
+
+1. OVERVIEW
+
+Date and time of execution: 2009.10.28 14:17
+Tool version: GNATCHECK (built with ASIS 2.0.R for GNAT Pro 6.3.0w (20091016))
+Command line:
+
+gnatcheck -files=.../GNAT-TEMP-000004.TMP -cargs -gnatec=.../GNAT-TEMP-000003.TMP -rules -from=coding_standard
+
+Coding standard (applied rules):
+   Abstract_Type_Declarations
+   Anonymous_Arrays
+   EXIT_Statements_With_No_Loop_Name
+   Float_Equality_Checks
+   Local_Packages
+
+   Compiler style checks: -gnatye
+
+Number of coding standard violations: 6
+Number of exempted coding standard violations: 1
+
+2. DETECTED RULE VIOLATIONS
+
+2.1. NON-EXEMPTED VIOLATIONS
+
+Source files with non-exempted violations
+   pack.ads
+   pack.adb
+   main.adb
+
+List of violations grouped by files, and ordered by increasing source location:
+
+pack.ads:2:4: declaration of abstract type
+pack.ads:5:4: declaration of local package
+pack.ads:10:30: declaration of abstract type
+pack.ads:11:1: (style) "end Pack" required
+pack.adb:5:19: use of equality operation for float values
+pack.adb:6:7: (style) "end Is_Equal" required
+main.adb:9:26: anonymous array type
+main.adb:19:10: exit statement with no loop name
+
+2.2. EXEMPTED VIOLATIONS
+
+Source files with exempted violations
+   main.adb
+
+List of violations grouped by files, and ordered by increasing source location:
+
+main.adb:6:18: anonymous array type
+   (this one is fine)
+
+2.3. SOURCE FILES WITH NO VIOLATION
+
+   No files without violations
+
+END OF REPORT
+@end smallexample
+
 
 @c *********************************
 @node Creating Sample Bodies Using gnatstub
@@ -22942,7 +23206,9 @@ option @option{^--no-exception^/NO_EXCEPTION^} (see below).
 @command{gnatstub} has the command-line interface of the form
 
 @smallexample
-$ gnatstub @ovar{switches} @var{filename} @ovar{directory}
+@c $ gnatstub @ovar{switches} @var{filename} @ovar{directory}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatstub @r{[}@var{switches}@r{]} @var{filename} @r{[}@var{directory}@r{]}
 @end smallexample
 
 @noindent
@@ -23111,10 +23377,23 @@ Verbose mode: generate version information.
 @findex binding
 
 @noindent
-GNAT now comes with a new experimental binding generator for C and C++
-headers which is intended to do 95% of the tedious work of generating
-Ada specs from C or C++ header files. Note that this still is a work in
-progress, not designed to generate 100% correct Ada specs.
+GNAT now comes with a binding generator for C and C++ headers which is
+intended to do 95% of the tedious work of generating Ada specs from C
+or C++ header files.
+
+Note that this capability is not intended to generate 100% correct Ada specs,
+and will is some cases require manual adjustments, although it can often
+be used out of the box in practice.
+
+Some of the known limitations include:
+
+@itemize @bullet
+@item only very simple character constant macros are translated into Ada
+constants. Function macros (macros with arguments) are partially translated
+as comments, to be completed manually if needed.
+@item some extensions (e.g. vector types) are not supported
+@item pointers to pointers or complex structures are mapped to System.Address
+@end itemize
 
 The code generated is using the Ada 2005 syntax, which makes it
 easier to interface with other languages than previous versions of Ada.
@@ -23461,7 +23740,9 @@ be able to click on any identifier and go to its declaration.
 
 The command line is as follow:
 @smallexample
-$ perl gnathtml.pl @ovar{^switches^options^} @var{ada-files}
+@c $ perl gnathtml.pl @ovar{^switches^options^} @var{ada-files}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ perl gnathtml.pl @r{[}@var{^switches^options^}@r{]} @var{ada-files}
 @end smallexample
 
 @noindent
@@ -23567,7 +23848,9 @@ is. The syntax of this line is:
 Alternatively, you may run the script using the following command line:
 
 @smallexample
-$ perl gnathtml.pl @ovar{switches} @var{files}
+@c $ perl gnathtml.pl @ovar{switches} @var{files}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ perl gnathtml.pl @r{[}@var{switches}@r{]} @var{files}
 @end smallexample
 
 @ifset vms
@@ -26691,6 +26974,7 @@ information about several specific platforms.
 * AIX-Specific Considerations::
 * Irix-Specific Considerations::
 * RTX-Specific Considerations::
+* HP-UX-Specific Considerations::
 @end menu
 
 @node Summary of Run-Time Configurations
@@ -27054,6 +27338,42 @@ over all Windows applications (@emph{rts-rtx-rtss}).
 
 @end itemize
 
+@node HP-UX-Specific Considerations
+@section HP-UX-Specific Considerations
+@cindex HP-UX Scheduling
+
+@noindent
+On HP-UX, appropriate privileges are required to change the scheduling
+parameters of a task. The calling process must have appropriate
+privileges or be a member of a group having @code{PRIV_RTSCHED} access to
+successfully change the scheduling parameters.
+
+By default, GNAT uses the @code{SCHED_HPUX} policy. To have access to the
+priority range 0-31 either the @code{FIFO_Within_Priorities} or the
+@code{Round_Robin_Within_Priorities} scheduling policies need to be set.
+
+To specify the @code{FIFO_Within_Priorities} scheduling policy you can use
+one of the following:
+
+@itemize @bullet
+@item
+@code{pragma Time_Slice (0.0)}
+@cindex pragma Time_Slice
+@item
+the corresponding binder option @option{-T0}
+@cindex @option{-T0} option
+@item
+@code{pragma Task_Dispatching_Policy (FIFO_Within_Priorities)}
+@cindex pragma Task_Dispatching_Policy
+@end itemize
+
+@noindent
+To specify the @code{Round_Robin_Within_Priorities}, scheduling policy
+you should use @code{pragma Time_Slice} with a
+value greater than @code{0.0}, or use the corresponding @option{-T}
+binder option, or set the @code{pragma Task_Dispatching_Policy
+(Round_Robin_Within_Priorities)}.
+
 @c *******************************
 @node Example of Binder Output File
 @appendix Example of Binder Output File
@@ -33042,7 +33362,9 @@ static import library for the DLL and the actual DLL. The form of the
 
 @smallexample
 @cartouche
-$ gnatdll @ovar{switches} @var{list-of-files} @r{[}-largs @var{opts}@r{]}
+@c $ gnatdll @ovar{switches} @var{list-of-files} @r{[}-largs @var{opts}@r{]}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ gnatdll @r{[}@var{switches}@r{]} @var{list-of-files} @r{[}-largs @var{opts}@r{]}
 @end cartouche
 @end smallexample
 
@@ -33058,7 +33380,9 @@ missing, only the static import library is generated.
 You may specify any of the following switches to @code{gnatdll}:
 
 @table @code
-@item -a@ovar{address}
+@c @item -a@ovar{address}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+@item -a@r{[}@var{address}@r{]}
 @cindex @option{-a} (@code{gnatdll})
 Build a non-relocatable DLL at @var{address}. If @var{address} is not
 specified the default address @var{0x11000000} will be used. By default,
@@ -33261,7 +33585,9 @@ common @code{dlltool} switches. The form of the @code{dlltool} command
 is
 
 @smallexample
-$ dlltool @ovar{switches}
+@c $ dlltool @ovar{switches}
+@c Expanding @ovar macro inline (explanation in macro def comments)
+$ dlltool @r{[}@var{switches}@r{]}
 @end smallexample
 
 @noindent