OSDN Git Service

* decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
[pf3gnuchains/gcc-fork.git] / gcc / ada / gnat_rm.texi
index 4b906fe..84a95a7 100644 (file)
@@ -112,6 +112,7 @@ Implementation Defined Pragmas
 * Pragma Common_Object::
 * Pragma Compile_Time_Error::
 * Pragma Compile_Time_Warning::
+* Pragma Compiler_Unit::
 * Pragma Complete_Representation::
 * Pragma Complex_Representation::
 * Pragma Component_Alignment::
@@ -181,6 +182,7 @@ Implementation Defined Pragmas
 * Pragma Pure_Function::
 * Pragma Restriction_Warnings::
 * Pragma Shared::
+* Pragma Short_Circuit_And_Or::
 * Pragma Source_File_Name::
 * Pragma Source_File_Name_Project::
 * Pragma Source_Reference::
@@ -252,6 +254,7 @@ Implementation Defined Attributes
 * Passed_By_Reference::
 * Pool_Address::
 * Range_Length::
+* Result::
 * Safe_Emax::
 * Safe_Large::
 * Small::
@@ -374,6 +377,10 @@ The GNAT Library
 * GNAT.Semaphores (g-semaph.ads)::
 * GNAT.Serial_Communications (g-sercom.ads)::
 * GNAT.SHA1 (g-sha1.ads)::
+* GNAT.SHA224 (g-sha224.ads)::
+* GNAT.SHA256 (g-sha256.ads)::
+* GNAT.SHA384 (g-sha384.ads)::
+* GNAT.SHA512 (g-sha512.ads)::
 * GNAT.Signals (g-signal.ads)::
 * GNAT.Sockets (g-socket.ads)::
 * GNAT.Source_Info (g-souinf.ads)::
@@ -722,6 +729,7 @@ consideration, the use of these pragmas should be minimized.
 * Pragma Common_Object::
 * Pragma Compile_Time_Error::
 * Pragma Compile_Time_Warning::
+* Pragma Compiler_Unit::
 * Pragma Complete_Representation::
 * Pragma Complex_Representation::
 * Pragma Component_Alignment::
@@ -791,6 +799,7 @@ consideration, the use of these pragmas should be minimized.
 * Pragma Pure_Function::
 * Pragma Restriction_Warnings::
 * Pragma Shared::
+* Pragma Short_Circuit_And_Or::
 * Pragma Source_File_Name::
 * Pragma Source_File_Name_Project::
 * Pragma Source_Reference::
@@ -924,7 +933,7 @@ same syntax and effect.
 @noindent
 Syntax:
 @smallexample @c ada
-pragma Annotate (IDENTIFIER @{, ARG@});
+pragma Annotate (IDENTIFIER [,IDENTIFIER] @{, ARG@});
 
 ARG ::= NAME | EXPRESSION
 @end smallexample
@@ -932,11 +941,14 @@ ARG ::= NAME | EXPRESSION
 @noindent
 This pragma is used to annotate programs.  @var{identifier} identifies
 the type of annotation.  GNAT verifies that it is an identifier, but does
-not otherwise analyze it.  The @var{arg} argument
-can be either a string literal or an
-expression.  String literals are assumed to be of type
-@code{Standard.String}.  Names of entities are simply analyzed as entity
-names.  All other expressions are analyzed as expressions, and must be
+not otherwise analyze it. The second optional identifier is also left
+unanalyzed, and by convention is used to control the action of the tool to
+which the annotation is addressed.  The remaining @var{arg} arguments
+can be either string literals or more generally expressions.
+String literals are assumed to be either of type
+@code{Standard.String} or else @code{Wide_String} or @code{Wide_Wide_String}
+depending on the character literals they contain.
+All other kinds of arguments are analyzed as expressions, and must be
 unambiguous.
 
 The analyzed pragma is retained in the tree, but not otherwise processed
@@ -1333,6 +1345,24 @@ of formal parameters are tested, and warnings given appropriately. Another use
 with a first parameter of True is to warn a client about use of a package,
 for example that it is not fully implemented.
 
+@node Pragma Compiler_Unit
+@unnumberedsec Pragma Compiler_Unit
+@findex Compiler_Unit
+@noindent
+Syntax:
+
+@smallexample @c ada
+pragma Compiler_Unit;
+@end smallexample
+
+@noindent
+This pragma is intended only for internal use in the GNAT run-time library.
+It indicates that the unit is used as part of the compiler build. The effect
+is to disallow constructs (raise with message, conditional expressions etc)
+that would cause trouble when bootstrapping using an older version of GNAT.
+For the exact list of restrictions, see the compiler sources and references
+to Is_Compiler_Unit.
+
 @node Pragma Complete_Representation
 @unnumberedsec Pragma Complete_Representation
 @findex Complete_Representation
@@ -4233,6 +4263,20 @@ if the restriction is violated.
 This pragma is provided for compatibility with Ada 83. The syntax and
 semantics are identical to pragma Atomic.
 
+@node Pragma Short_Circuit_And_Or
+@unnumberedsec Pragma Short_Circuit_And_Or
+@findex Short_Circuit_And_Or
+
+@noindent
+This configuration pragma causes any occurrence of the AND operator applied to
+operands of type Standard.Boolean to be short-circuited (i.e. the AND operator
+is treated as if it were AND THEN). Or is similarly treated as OR ELSE. This
+may be useful in the context of certification protocols requiring the use of
+short-circuited logical operators. If this configuration pragma occurs locally
+within the file being compiled, it applies only to the file being compiled.
+There is no requirement that all units in a partition use this option.
+
+semantics are identical to pragma Atomic.
 @node Pragma Source_File_Name
 @unnumberedsec Pragma Source_File_Name
 @findex Source_File_Name
@@ -4263,7 +4307,7 @@ name for the spec or for the body.
 The optional Index argument should be used when a file contains multiple
 units, and when you do not want to use @code{gnatchop} to separate then
 into multiple files (which is the recommended procedure to limit the
-number of recompilation that are needed when some sources change).
+number of recompilations that are needed when some sources change).
 For instance, if the source file @file{source.ada} contains
 
 @smallexample @c ada
@@ -5157,80 +5201,12 @@ The form with a single static_string_EXPRESSION argument provides more precise
 control over which warnings are active. The string is a list of letters
 specifying which warnings are to be activated and which deactivated. The
 code for these letters is the same as the string used in the command
-line switch controlling warnings. The following is a brief summary. For
+line switch controlling warnings. For a brief summary, use the gnatmake
+command with no arguments, which will generate usage information containing
+the list of warnings switches supported. For
 full details see @ref{Warning Message Control,,, gnat_ugn, @value{EDITION}
 User's Guide}.
 
-@smallexample
-a    turn on all optional warnings (except d h l .o)
-A    turn off all optional warnings
-.a*  turn on warnings for failing assertions
-.A   turn off warnings for failing assertions
-b    turn on warnings for bad fixed value (not multiple of small)
-B*   turn off warnings for bad fixed value (not multiple of small)
-.b*  turn on warnings for biased representation
-.B   turn off warnings for biased representation
-c    turn on warnings for constant conditional
-C*   turn off warnings for constant conditional
-.c   turn on warnings for unrepped components
-.C*  turn off warnings for unrepped components
-d    turn on warnings for implicit dereference
-D*   turn off warnings for implicit dereference
-e    treat all warnings as errors
-.e   turn on every optional warning
-f    turn on warnings for unreferenced formal
-F*   turn off warnings for unreferenced formal
-g*   turn on warnings for unrecognized pragma
-G    turn off warnings for unrecognized pragma
-h    turn on warnings for hiding variable
-H*   turn off warnings for hiding variable
-i*   turn on warnings for implementation unit
-I    turn off warnings for implementation unit
-j    turn on warnings for obsolescent (annex J) feature
-J*   turn off warnings for obsolescent (annex J) feature
-k    turn on warnings on constant variable
-K*   turn off warnings on constant variable
-l    turn on warnings for missing elaboration pragma
-L*   turn off warnings for missing elaboration pragma
-m    turn on warnings for variable assigned but not read
-M*   turn off warnings for variable assigned but not read
-n*   normal warning mode (cancels -gnatws/-gnatwe)
-o*   turn on warnings for address clause overlay
-O    turn off warnings for address clause overlay
-.o   turn on warnings for out parameters assigned but not read
-.O*  turn off warnings for out parameters assigned but not read
-p    turn on warnings for ineffective pragma Inline in frontend
-P*   turn off warnings for ineffective pragma Inline in frontend
-.p   turn on warnings for parameter ordering
-.P*  turn off warnings for parameter ordering
-q*   turn on warnings for questionable missing parentheses
-Q    turn off warnings for questionable missing parentheses
-r    turn on warnings for redundant construct
-R*   turn off warnings for redundant construct
-.r   turn on warnings for object renaming function
-.R*  turn off warnings for object renaming function
-s    suppress all warnings
-t    turn on warnings for tracking deleted code
-T*   turn off warnings for tracking deleted code
-u    turn on warnings for unused entity
-U*   turn off warnings for unused entity
-v*   turn on warnings for unassigned variable
-V    turn off warnings for unassigned variable
-w*   turn on warnings for wrong low bound assumption
-W    turn off warnings for wrong low bound assumption
-.w   turn on warnings for unnecessary Warnings Off pragmas
-.W*  turn off warnings for unnecessary Warnings Off pragmas
-x*   turn on warnings for export/import
-X    turn off warnings for export/import
-.x   turn on warnings for non-local exceptions
-.X*  turn off warnings for non-local exceptions
-y*   turn on warnings for Ada 2005 incompatibility
-Y    turn off warnings for Ada 2005 incompatibility
-z*   turn on convention/size/align warnings for unchecked conversion
-Z    turn off convention/size/align warnings for unchecked conversion
-*    indicates default in above list
-@end smallexample
-
 @noindent
 The specified warnings will be in effect until the end of the program
 or another pragma Warnings is encountered. The effect of the pragma is
@@ -5268,6 +5244,11 @@ pragma Warnings (On, Pattern);
 In this usage, the pattern string must match in the Off and On pragmas,
 and at least one matching warning must be suppressed.
 
+Note: the debug flag -gnatd.i (@code{/NOWARNINGS_PRAGMAS} in VMS) can be
+used to cause the compiler to entirely ignore all WARNINGS pragmas. This can
+be useful in checking whether obsolete pragmas in existing programs are hiding
+real problems.
+
 @node Pragma Weak_External
 @unnumberedsec Pragma Weak_External
 @findex Weak_External
@@ -5403,6 +5384,7 @@ consideration, you should minimize the use of these attributes.
 * Passed_By_Reference::
 * Pool_Address::
 * Range_Length::
+* Result::
 * Safe_Emax::
 * Safe_Large::
 * Small::
@@ -6054,6 +6036,16 @@ range).  The result is static for static subtypes.  @code{Range_Length}
 applied to the index subtype of a one dimensional array always gives the
 same result as @code{Range} applied to the array itself.
 
+@node Result
+@unnumberedsec Result
+@findex Result
+@noindent
+@code{@var{function}'Result} can only be used with in a Postcondition pragma
+for a function. The prefix must be the name of the corresponding function. This
+is used to refer to the result of the function in the postcondition expression.
+For a further discussion of the use of this attribute and examples of its use,
+see the description of pragma Postcondition.
+
 @node Safe_Emax
 @unnumberedsec Safe_Emax
 @cindex Ada 83 attributes
@@ -13566,6 +13558,10 @@ of GNAT, and will generate a warning message.
 * GNAT.Semaphores (g-semaph.ads)::
 * GNAT.Serial_Communications (g-sercom.ads)::
 * GNAT.SHA1 (g-sha1.ads)::
+* GNAT.SHA224 (g-sha224.ads)::
+* GNAT.SHA256 (g-sha256.ads)::
+* GNAT.SHA384 (g-sha384.ads)::
+* GNAT.SHA512 (g-sha512.ads)::
 * GNAT.Signals (g-signal.ads)::
 * GNAT.Sockets (g-socket.ads)::
 * GNAT.Source_Info (g-souinf.ads)::
@@ -14563,7 +14559,40 @@ port. This is only supported on GNU/Linux and Windows.
 @cindex Secure Hash Algorithm SHA-1
 
 @noindent
-Implements the SHA-1 Secure Hash Algorithm as described in RFC 3174.
+Implements the SHA-1 Secure Hash Algorithm as described in FIPS PUB 180-3
+and RFC 3174.
+
+@node GNAT.SHA224 (g-sha224.ads)
+@section @code{GNAT.SHA224} (@file{g-sha224.ads})
+@cindex @code{GNAT.SHA224} (@file{g-sha224.ads})
+@cindex Secure Hash Algorithm SHA-224
+
+@noindent
+Implements the SHA-224 Secure Hash Algorithm as described in FIPS PUB 180-3.
+
+@node GNAT.SHA256 (g-sha256.ads)
+@section @code{GNAT.SHA256} (@file{g-sha256.ads})
+@cindex @code{GNAT.SHA256} (@file{g-sha256.ads})
+@cindex Secure Hash Algorithm SHA-256
+
+@noindent
+Implements the SHA-256 Secure Hash Algorithm as described in FIPS PUB 180-3.
+
+@node GNAT.SHA384 (g-sha384.ads)
+@section @code{GNAT.SHA384} (@file{g-sha384.ads})
+@cindex @code{GNAT.SHA384} (@file{g-sha384.ads})
+@cindex Secure Hash Algorithm SHA-384
+
+@noindent
+Implements the SHA-384 Secure Hash Algorithm as described in FIPS PUB 180-3.
+
+@node GNAT.SHA512 (g-sha512.ads)
+@section @code{GNAT.SHA512} (@file{g-sha512.ads})
+@cindex @code{GNAT.SHA512} (@file{g-sha512.ads})
+@cindex Secure Hash Algorithm SHA-512
+
+@noindent
+Implements the SHA-512 Secure Hash Algorithm as described in FIPS PUB 180-3.
 
 @node GNAT.Signals (g-signal.ads)
 @section @code{GNAT.Signals} (@file{g-signal.ads})
@@ -16425,7 +16454,7 @@ package_spec ::=
 package_identifier ::=
   @code{Naming} | @code{Builder} | @code{Compiler} | @code{Binder} |
   @code{Linker} | @code{Finder}  | @code{Cross_Reference} |
-  @code{gnatls} | @code{IDE}     | @code{Pretty_Printer}
+  @code{gnatls} | @code{IDE}     | @code{Pretty_Printer} | @code{Check}
 @end smallexample
 
 @subsection Package Naming
@@ -16746,6 +16775,25 @@ be called with the options specified by Default_Switches of its language,
 if defined.
 @end table
 
+@subsection package Check
+
+@noindent
+The attributes of package @code{Check}
+specify the checking rule options to be used
+when invoking the checking tool @command{gnatcheck}.
+The following attributes apply to package @code{Check}:
+
+@table @code
+@item     Default_switches
+This is an associative array attribute. Its
+domain is a set of language names. Its range is a string list that
+specifies options to be used when calling @command{gnatcheck} on a source
+written in that language. The first string in the range should always be
+@code{"-rules"} to specify that all the other options belong to the
+@code{-rules} section of the parameters of @command{gnatcheck} call.
+
+@end table
+
 @subsection package Pretty_Printer
 
 @noindent