OSDN Git Service

* decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
[pf3gnuchains/gcc-fork.git] / gcc / ada / gnat_rm.texi
index 4d50a50..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::
@@ -194,6 +196,7 @@ Implementation Defined Pragmas
 * Pragma Task_Info::
 * Pragma Task_Name::
 * Pragma Task_Storage::
+* Pragma Thread_Local_Storage::
 * Pragma Time_Slice::
 * Pragma Title::
 * Pragma Unchecked_Union::
@@ -221,6 +224,7 @@ Implementation Defined Attributes
 * AST_Entry::
 * Bit::
 * Bit_Position::
+* Compiler_Version::
 * Code_Address::
 * Default_Bit_Order::
 * Elaborated::
@@ -250,6 +254,7 @@ Implementation Defined Attributes
 * Passed_By_Reference::
 * Pool_Address::
 * Range_Length::
+* Result::
 * Safe_Emax::
 * Safe_Large::
 * Small::
@@ -305,10 +310,13 @@ The GNAT Library
 * Ada.Strings.Wide_Unbounded.Wide_Text_IO (a-swuwti.ads)::
 * Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO (a-szuzti.ads)::
 * Ada.Text_IO.C_Streams (a-tiocst.ads)::
+* Ada.Text_IO.Reset_Standard_Files (a-tirsfi.ads)::
 * Ada.Wide_Characters.Unicode (a-wichun.ads)::
 * Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads)::
+* Ada.Wide_Text_IO.Reset_Standard_Files (a-wrstfi.ads)::
 * Ada.Wide_Wide_Characters.Unicode (a-zchuni.ads)::
 * Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads)::
+* Ada.Wide_Wide_Text_IO.Reset_Standard_Files (a-zrstfi.ads)::
 * GNAT.Altivec (g-altive.ads)::
 * GNAT.Altivec.Conversions (g-altcon.ads)::
 * GNAT.Altivec.Vector_Operations (g-alveop.ads)::
@@ -369,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)::
@@ -379,6 +391,8 @@ The GNAT Library
 * GNAT.Spitbol.Table_Boolean (g-sptabo.ads)::
 * GNAT.Spitbol.Table_Integer (g-sptain.ads)::
 * GNAT.Spitbol.Table_VString (g-sptavs.ads)::
+* GNAT.SSE (g-sse.ads)::
+* GNAT.SSE.Vector_Types (g-ssvety.ads)::
 * GNAT.Strings (g-string.ads)::
 * GNAT.String_Split (g-strspl.ads)::
 * GNAT.Table (g-table.ads)::
@@ -407,6 +421,7 @@ The GNAT Library
 * System.Pool_Local (s-pooloc.ads)::
 * System.Restrictions (s-restri.ads)::
 * System.Rident (s-rident.ads)::
+* System.Strings.Stream_Ops (s-ststop.ads)::
 * System.Task_Info (s-tasinf.ads)::
 * System.Wch_Cnv (s-wchcnv.ads)::
 * System.Wch_Con (s-wchcon.ads)::
@@ -683,8 +698,7 @@ compiler system.
 @noindent
 Ada defines a set of pragmas that can be used to supply additional
 information to the compiler.  These language defined pragmas are
-implemented in GNAT and work as described in the Ada Reference
-Manual.
+implemented in GNAT and work as described in the Ada Reference Manual.
 
 In addition, Ada allows implementations to define additional pragmas
 whose meaning is defined by the implementation.  GNAT provides a number
@@ -715,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::
@@ -784,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::
@@ -797,6 +813,7 @@ consideration, the use of these pragmas should be minimized.
 * Pragma Task_Info::
 * Pragma Task_Name::
 * Pragma Task_Storage::
+* Pragma Thread_Local_Storage::
 * Pragma Time_Slice::
 * Pragma Title::
 * Pragma Unchecked_Union::
@@ -916,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
@@ -924,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
@@ -1040,7 +1060,15 @@ value, and the loop above will be optimized away.
 The use of @code{Assume_No_Invalid_Values (On)} is appropriate if
 you know your code is free of uninitialized variables and other
 possible sources of invalid representations, and may result in
-more efficient code.
+more efficient code. A program that accesses an invalid representation
+with this pragma in effect is erroneous, so no guarantees can be made
+about its behavior.
+
+It is peculiar though permissible to use this pragma in conjunction
+with validity checking (-gnatVa). In such cases, accessing invalid
+values will generally give an exception, though formally the program
+is erroneous so there are no guarantees that this will always be the
+case, and it is recommended that these two options not be used together.
 
 @node Pragma Ast_Entry
 @unnumberedsec Pragma Ast_Entry
@@ -1170,7 +1198,9 @@ are mentioned in @code{with} clauses).
 @noindent
 Syntax:
 @smallexample @c ada
-pragma Check_Policy ([Name =>] Identifier, POLICY_IDENTIFIER);
+pragma Check_Policy
+ ([Name   =>] Identifier,
+  [Policy =>] POLICY_IDENTIFIER);
 
 POLICY_IDENTIFIER ::= On | Off | Check | Ignore
 @end smallexample
@@ -1315,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
@@ -1482,16 +1530,17 @@ pragma CPP_Class ([Entity =>] LOCAL_NAME);
 
 @noindent
 The argument denotes an entity in the current declarative region that is
-declared as a tagged record type. It indicates that the type corresponds
-to an externally declared C++ class type, and is to be laid out the same
-way that C++ would lay out the type.
+declared as a record type. It indicates that the type corresponds to an
+externally declared C++ class type, and is to be laid out the same way
+that C++ would lay out the type. If the C++ class has virtual primitives
+then the record must be declared as a tagged record type.
 
 Types for which @code{CPP_Class} is specified do not have assignment or
 equality operators defined (such operations can be imported or declared
 as subprograms as required). Initialization is allowed only by constructor
 functions (see pragma @code{CPP_Constructor}). Such types are implicitly
 limited if not explicitly declared as limited or derived from a limited
-type, and a warning is issued in that case.
+type, and an error is issued in that case.
 
 Pragma @code{CPP_Class} is intended primarily for automatic generation
 using an automatic binding generator tool.
@@ -1524,59 +1573,42 @@ must be of one of the following forms:
 
 @itemize @bullet
 @item
+@code{function @var{Fname} return @var{T}}
+
+@itemize @bullet
+@item
 @code{function @var{Fname} return @var{T}'Class}
 
 @item
-@code{function @var{Fname} (@dots{}) return @var{T}'Class}
+@code{function @var{Fname} (@dots{}) return @var{T}}
 @end itemize
 
-@noindent
-where @var{T} is a tagged type to which the pragma @code{CPP_Class} applies.
-
-The first form is the default constructor, used when an object of type
-@var{T} is created on the Ada side with no explicit constructor.  Other
-constructors (including the copy constructor, which is simply a special
-case of the second form in which the one and only argument is of type
-@var{T}), can only appear in two contexts:
-
-@itemize @bullet
 @item
-On the right side of an initialization of an object of type @var{T}.
-@item
-In an extension aggregate for an object of a type derived from @var{T}.
+@code{function @var{Fname} (@dots{}) return @var{T}'Class}
 @end itemize
 
 @noindent
-Although the constructor is described as a function that returns a value
-on the Ada side, it is typically a procedure with an extra implicit
-argument (the object being initialized) at the implementation
-level.  GNAT issues the appropriate call, whatever it is, to get the
-object properly initialized.
-
-In the case of derived objects, you may use one of two possible forms
-for declaring and creating an object:
-
-@itemize @bullet
-@item @code{New_Object : Derived_T}
-@item @code{New_Object : Derived_T := (@var{constructor-call with} @dots{})}
-@end itemize
+where @var{T} is a limited record type imported from C++ with pragma
+@code{Import} and @code{Convention} = @code{CPP}.
 
-@noindent
-In the first case the default constructor is called and extension fields
-if any are initialized according to the default initialization
-expressions in the Ada declaration.  In the second case, the given
-constructor is called and the extension aggregate indicates the explicit
-values of the extension fields.
+The first two forms import the default constructor, used when an object
+of type @var{T} is created on the Ada side with no explicit constructor.
+The latter two forms cover all the non-default constructors of the type.
+See the GNAT users guide for details.
 
 If no constructors are imported, it is impossible to create any objects
-on the Ada side.  If no default constructor is imported, only the
-initialization forms using an explicit call to a constructor are
-permitted.
+on the Ada side and the type is implicitly declared abstract.
 
 Pragma @code{CPP_Constructor} is intended primarily for automatic generation
 using an automatic binding generator tool.
 See @ref{Interfacing to C++} for more related information.
 
+Note: The use of functions returning class-wide types for constructors is
+currently obsolete. They are supported for backward compatibility. The
+use of functions returning the type T leave the Ada sources more clear
+because the imported C++ constructors always return an object of type T;
+that is, they never return an object whose type is a descendant of type T.
+
 @node Pragma CPP_Virtual
 @unnumberedsec Pragma CPP_Virtual
 @cindex Interfacing to C++
@@ -2429,7 +2461,8 @@ pragma Implicit_Packing;
 @noindent
 This is a configuration pragma that requests implicit packing for packed
 arrays for which a size clause is given but no explicit pragma Pack or
-specification of Component_Size is present. Consider this example:
+specification of Component_Size is present. It also applies to records
+where no record representation clause is present. Consider this example:
 
 @smallexample @c ada
 type R is array (0 .. 7) of Boolean;
@@ -2451,6 +2484,21 @@ specify the exact size that corresponds to the length of the array multiplied
 by the size in bits of the component type.
 @cindex Array packing
 
+Similarly, the following example shows the use in the record case
+
+@smallexample @c ada
+type r is record
+   a, b, c, d, e, f, g, h : boolean;
+   chr                    : character;
+end record;
+for r'size use 16;
+@end smallexample
+
+@noindent
+Without a pragma Pack, each Boolean field requires 8 bits, so the
+minimum size is 72 bits, but with a pragma Pack, 16 bits would be
+sufficient. The use of pragma Implciit_Packing allows this record
+declaration to compile without an explicit pragma Pack.
 @node Pragma Import_Exception
 @unnumberedsec Pragma Import_Exception
 @cindex OpenVMS
@@ -2856,7 +2904,9 @@ maskable interrupts, in place of the normal return instruction.
 Syntax:
 
 @smallexample @c ada
-pragma Interrupt_State (Name => value, State => SYSTEM | RUNTIME | USER);
+pragma Interrupt_State
+ ([Name  =>] value,
+  [State =>] SYSTEM | RUNTIME | USER);
 @end smallexample
 
 @noindent
@@ -3244,7 +3294,7 @@ Syntax:
 pragma Machine_Attribute (
      [Entity         =>] LOCAL_NAME,
      [Attribute_Name =>] static_string_EXPRESSION
-  [, [Info           =>] static_string_EXPRESSION] );
+  [, [Info           =>] static_EXPRESSION] );
 @end smallexample
 
 @noindent
@@ -3253,15 +3303,12 @@ declarations.  This pragma is semantically equivalent to
 @code{__attribute__((@var{attribute_name}))} (if @var{info} is not
 specified) or @code{__attribute__((@var{attribute_name}(@var{info})))}
 in GNU C, where @code{@var{attribute_name}} is recognized by the
-target macro @code{TARGET_ATTRIBUTE_TABLE} which is defined for each
-machine.  The optional parameter @var{info} is transformed into an
-identifier, which may make this pragma unusable for some attributes
-(parameter of some attributes must be a number or a string).
-@xref{Target Attributes,, Defining target-specific uses of
-@code{__attribute__}, gccint, GNU Compiler Colletion (GCC) Internals},
-further information.  It is not possible to specify
-attributes defined by other languages, only attributes defined by the
-machine the code is intended to run on.
+compiler middle-end or the @code{TARGET_ATTRIBUTE_TABLE} machine
+specific macro.  A string literal for the optional parameter @var{info}
+is transformed into an identifier, which may make this pragma unusable
+for some attributes.  @xref{Target Attributes,, Defining target-specific
+uses of @code{__attribute__}, gccint, GNU Compiler Collection (GCC)
+Internals}, further information.
 
 @node Pragma Main
 @unnumberedsec Pragma Main
@@ -3275,9 +3322,9 @@ pragma Main
  (MAIN_OPTION [, MAIN_OPTION]);
 
 MAIN_OPTION ::=
-  [STACK_SIZE              =>] static_integer_EXPRESSION
-| [TASK_STACK_SIZE_DEFAULT =>] static_integer_EXPRESSION
-| [TIME_SLICING_ENABLED    =>] static_boolean_EXPRESSION
+  [Stack_Size              =>] static_integer_EXPRESSION
+| [Task_Stack_Size_Default =>] static_integer_EXPRESSION
+| [Time_Slicing_Enabled    =>] static_boolean_EXPRESSION
 @end smallexample
 
 @noindent
@@ -3458,17 +3505,26 @@ will always generate an invalid value if one exists.
 Syntax:
 
 @smallexample @c ada
-pragma Obsolescent
-  [(Entity => NAME [, static_string_EXPRESSION [,Ada_05]])];
+pragma Obsolescent;
+
+pragma Obsolescent (
+  [Message =>] static_string_EXPRESSION
+[,[Version =>] Ada_05]]);
+
+pragma Obsolescent (
+  [Entity  =>] NAME
+[,[Message =>] static_string_EXPRESSION
+[,[Version =>] Ada_05]] );
 @end smallexample
 
 @noindent
 This pragma can occur immediately following a declaration of an entity,
-including the case of a record component, and usually the Entity name
-must match the name of the entity declared by this declaration.
-Alternatively, the pragma can immediately follow an
-enumeration type declaration, where the entity argument names one of the
-enumeration literals.
+including the case of a record component. If no Entity argument is present,
+then this declaration is the one to which the pragma applies. If an Entity
+parameter is present, it must either match the name of the entity in this
+declaration, or alternatively, the pragma can immediately follow an enumeration
+type declaration, where the Entity argument names one of the enumeration
+literals.
 
 This pragma is used to indicate that the named entity
 is considered obsolescent and should not be used. Typically this is
@@ -3477,13 +3533,12 @@ existing subprograms or other entities. The pragma can be used at an
 intermediate stage when the entity is still present, but will be
 removed later.
 
-The effect of this pragma is to output a warning message on
-a call to a program thus marked that the
-subprogram is obsolescent if the appropriate warning option in the
-compiler is activated. If the string parameter is present, then a second
-warning message is given containing this text.
-In addition, a call to such a program is considered a violation of
-pragma Restrictions (No_Obsolescent_Features).
+The effect of this pragma is to output a warning message on a reference to
+an entity thus marked that the subprogram is obsolescent if the appropriate
+warning option in the compiler is activated. If the Message parameter is
+present, then a second warning message is given containing this text. In
+addition, a reference to the eneity is considered to be a violation of pragma
+Restrictions (No_Obsolescent_Features).
 
 This pragma can also be used as a program unit pragma for a package,
 in which case the entity name is the name of the package, and the
@@ -3492,7 +3547,7 @@ obsolescent. In this case a client @code{with}'ing such a package
 violates the restriction, and the @code{with} statement is
 flagged with warnings if the warning option is set.
 
-If the optional third parameter is present (which must be exactly
+If the Version parameter is present (which must be exactly
 the identifier Ada_05, no other argument is allowed), then the
 indication of obsolescence applies only when compiling in Ada 2005
 mode. This is primarily intended for dealing with the situations
@@ -3504,23 +3559,23 @@ The following examples show typical uses of this pragma:
 
 @smallexample @c ada
 package p is
-   pragma Obsolescent
-     (Entity => p, "use pp instead of p");
+   pragma Obsolescent (p, Message => "use pp instead of p");
 end p;
 
 package q is
    procedure q2;
-   pragma Obsolescent
-     (Entity => q2, "use q2new instead");
+   pragma Obsolescent ("use q2new instead");
 
    type R is new integer;
    pragma Obsolescent
-     (Entity => R, "use RR in Ada 2005", Ada_05);
+     (Entity  => R,
+      Message => "use RR in Ada 2005",
+      Version => Ada_05);
 
    type M is record
       F1 : Integer;
       F2 : Integer;
-      pragma Obsolescent (Entity => F2);
+      pragma Obsolescent;
       F3 : Integer;
    end record;
 
@@ -3535,11 +3590,10 @@ end;
 @end smallexample
 
 @noindent
-In an earlier version of GNAT, the Entity parameter was not required,
-and this form is still accepted for compatibility purposes. If the
-Entity parameter is omitted, then the pragma applies to the declaration
-immediately preceding the pragma (this form cannot be used for the
-enumeration literal case).
+Note that, as for all pragmas, if you use a pragma argument identifier,
+then all subsequent parameters must also use a pragma argument identifier.
+So if you specify "Entity =>" for the Entity argument, and a Message
+argument is present, it must be preceded by "Message =>".
 
 @node Pragma Optimize_Alignment
 @unnumberedsec Pragma Optimize_Alignment
@@ -3726,8 +3780,11 @@ pragma Postcondition (
 The @code{Postcondition} pragma allows specification of automatic
 postcondition checks for subprograms. These checks are similar to
 assertions, but are automatically inserted just prior to the return
-statements of the subprogram with which they are associated.
-Furthermore, the boolean expression which is the condition which
+statements of the subprogram with which they are associated (including
+implicit returns at the end of procedure bodies and associated
+exception handlers).
+
+In addition, the boolean expression which is the condition which
 must be true may contain references to function'Result in the case
 of a function to refer to the returned value.
 
@@ -4206,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
@@ -4215,11 +4286,13 @@ Syntax:
 @smallexample @c ada
 pragma Source_File_Name (
   [Unit_Name   =>] unit_NAME,
-  Spec_File_Name =>  STRING_LITERAL);
+  Spec_File_Name =>  STRING_LITERAL,
+  [Index => INTEGER_LITERAL]);
 
 pragma Source_File_Name (
   [Unit_Name   =>] unit_NAME,
-  Body_File_Name =>  STRING_LITERAL);
+  Body_File_Name =>  STRING_LITERAL,
+  [Index => INTEGER_LITERAL]);
 @end smallexample
 
 @noindent
@@ -4231,25 +4304,55 @@ compilation, or to a single unit, depending on how it is used.
 the second argument is required, and indicates whether this is the file
 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 recompilations that are needed when some sources change).
+For instance, if the source file @file{source.ada} contains
+
+@smallexample @c ada
+package B is
+...
+end B;
+
+with B;
+procedure A is
+begin
+   ..
+end A;
+@end smallexample
+
+you could use the following configuration pragmas:
+
+@smallexample @c ada
+pragma Source_File_Name
+  (B, Spec_File_Name => "source.ada", Index => 1);
+pragma Source_File_Name
+  (A, Body_File_Name => "source.ada", Index => 2);
+@end smallexample
+
+Note that the @code{gnatname} utility can also be used to generate those
+configuration pragmas.
+
 Another form of the @code{Source_File_Name} pragma allows
 the specification of patterns defining alternative file naming schemes
 to apply to all files.
 
 @smallexample @c ada
 pragma Source_File_Name
-  (Spec_File_Name => STRING_LITERAL
-   [,Casing => CASING_SPEC]
-   [,Dot_Replacement => STRING_LITERAL]);
+  (  [Spec_File_Name  =>] STRING_LITERAL
+   [,[Casing          =>] CASING_SPEC]
+   [,[Dot_Replacement =>] STRING_LITERAL]);
 
 pragma Source_File_Name
-  (Body_File_Name => STRING_LITERAL
-   [,Casing => CASING_SPEC]
-   [,Dot_Replacement => STRING_LITERAL]);
+  (  [Body_File_Name  =>] STRING_LITERAL
+   [,[Casing          =>] CASING_SPEC]
+   [,[Dot_Replacement =>] STRING_LITERAL]);
 
 pragma Source_File_Name
-  (Subunit_File_Name => STRING_LITERAL
-   [,Casing => CASING_SPEC]
-   [,Dot_Replacement => STRING_LITERAL]);
+  (  [Subunit_File_Name =>] STRING_LITERAL
+   [,[Casing            =>] CASING_SPEC]
+   [,[Dot_Replacement   =>] STRING_LITERAL]);
 
 CASING_SPEC ::= Lowercase | Uppercase | Mixedcase
 @end smallexample
@@ -4380,10 +4483,12 @@ function To_String (Source : Unbounded_String)
 @end smallexample
 
 @noindent
-The effect is that if the value of an unbounded string is written to a
-stream, then the representation of the item in the stream is in the same
-format used for @code{Standard.String}, and this same representation is
-expected when a value of this type is read from the stream.
+The effect is that if the value of an unbounded string is written to a stream,
+then the representation of the item in the stream is in the same format that
+would be used for @code{Standard.String'Output}, and this same representation
+is expected when a value of this type is read from the stream. Note that the
+value written always includes the bounds, even for Unbounded_String'Write,
+since Unbounded_String is not an array type.
 
 @node Pragma Style_Checks
 @unnumberedsec Pragma Style_Checks
@@ -4656,6 +4761,35 @@ created, depending on the target.  This pragma can appear anywhere a
 @code{Storage_Size} attribute definition clause is allowed for a task
 type.
 
+@node Pragma Thread_Local_Storage
+@unnumberedsec Pragma Thread_Local_Storage
+@findex Thread_Local_Storage
+@cindex Task specific storage
+@cindex TLS (Thread Local Storage)
+Syntax:
+
+@smallexample @c ada
+pragma Thread_Local_Storage ([Entity =>] LOCAL_NAME);
+@end smallexample
+
+@noindent
+This pragma specifies that the specified entity, which must be
+a variable declared in a library level package, is to be marked as
+"Thread Local Storage" (@code{TLS}). On systems supporting this (which
+include Solaris, GNU/Linux and VxWorks 6), this causes each thread
+(and hence each Ada task) to see a distinct copy of the variable.
+
+The variable may not have default initialization, and if there is
+an explicit initialization, it must be either @code{null} for an
+access variable, or a static expression for a scalar variable.
+This provides a low level mechanism similar to that provided by
+the @code{Ada.Task_Attributes} package, but much more efficient
+and is also useful in writing interface code that will interact
+with foreign threads.
+
+If this pragma is used on a system where @code{TLS} is not supported,
+then an error message will be generated and the program will be rejected.
+
 @node Pragma Time_Slice
 @unnumberedsec Pragma Time_Slice
 @findex Time_Slice
@@ -5067,73 +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)
-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
-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
-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
-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
@@ -5145,9 +5218,9 @@ also be used as a configuration pragma.
 The fourth form, with an On|Off parameter and a string, is used to
 control individual messages, based on their text. The string argument
 is a pattern that is used to match against the text of individual
-warning messages (not including the initial "warnings: " tag).
+warning messages (not including the initial "warning: " tag).
 
-The pattern may contain asterisks which match zero or more characters in
+The pattern may contain asterisks, which match zero or more characters in
 the message. For example, you can use
 @code{pragma Warnings (Off, "*bits of*unused")} to suppress the warning
 message @code{warning: 960 bits of "a" unused}. No other regular
@@ -5171,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
@@ -5276,6 +5354,7 @@ consideration, you should minimize the use of these attributes.
 * AST_Entry::
 * Bit::
 * Bit_Position::
+* Compiler_Version::
 * Code_Address::
 * Default_Bit_Order::
 * Elaborated::
@@ -5305,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::
@@ -5428,6 +5508,15 @@ type @code{Universal_Integer}.  The value depends only on the field
 @var{C} and is independent of the alignment of
 the containing record @var{R}.
 
+@node Compiler_Version
+@unnumberedsec Compiler_Version
+@findex Compiler_Version
+@noindent
+@code{Standard'Compiler_Version} (@code{Standard} is the only allowed
+prefix) yields a static string identifying the version of the compiler
+being used to compile the unit containing the attribute reference. A
+typical result would be something like "GNAT Pro 6.3.0w (20090221)".
+
 @node Code_Address
 @unnumberedsec Code_Address
 @findex Code_Address
@@ -5947,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
@@ -7629,11 +7728,11 @@ Followed.
 In addition to the implementation dependent pragmas and attributes, and
 the implementation advice, there are a number of other Ada features
 that are potentially implementation dependent.  These are mentioned
-throughout the Ada Reference Manual, and are summarized in annex M@.
+throughout the Ada Reference Manual, and are summarized in Annex M@.
 
 A requirement for conforming Ada compilers is that they provide
 documentation describing how the implementation deals with each of these
-issues.  In this chapter, you will find each point in annex M listed
+issues.  In this chapter, you will find each point in Annex M listed
 followed by a description in italic font of how GNAT
 @c SGI info:
 @ignore
@@ -8343,8 +8442,8 @@ without a specific initializer (including the case of OUT scalar parameters).
 
 @item No_Direct_Boolean_Operators
 @findex No_Direct_Boolean_Operators
-This restriction ensures that no logical (and/or/xor) or comparison
-operators are used on operands of type Boolean (or any type derived
+This restriction ensures that no logical (and/or/xor) are used on
+operands of type Boolean (or any type derived
 from Boolean). This is intended for use in safety critical programs
 where the certification protocol requires the use of short-circuit
 (and then, or else) forms for all composite boolean operations.
@@ -8551,11 +8650,18 @@ user-defined storage pool.
 @item No_Streams
 @findex No_Streams
 This restriction ensures at compile/bind time that there are no
-stream objects created (and therefore no actual stream operations).
+stream objects created and no use of stream attributes.
 This restriction does not forbid dependences on the package
 @code{Ada.Streams}. So it is permissible to with
 @code{Ada.Streams} (or another package that does so itself)
-as long as no actual stream objects are created.
+as long as no actual stream objects are created and no
+stream attributes are used.
+
+Note that the use of restriction allows optimization of tagged types,
+since they do not need to worry about dispatching stream operations.
+To take maximum advantage of this space-saving optimization, any
+unit declaring a tagged type should be compiled with the restriction,
+though this is not required.
 
 @item No_Task_Attributes_Package
 @findex No_Task_Attributes_Package
@@ -10419,7 +10525,7 @@ On a typical 32-bit architecture, the X component will be four bytes, and
 require four-byte alignment, and the Y component will be one byte. In this
 case @code{R'Value_Size} will be 40 (bits) since this is the minimum size
 required to store a value of this type, and for example, it is permissible
-to have a component of type R in an outer record whose component size is
+to have a component of type R in an outer array whose component size is
 specified to be 48 bits. However, @code{R'Object_Size} will be 64 (bits),
 since it must be rounded up so that this value is a multiple of the
 alignment (4 bytes = 32 bits).
@@ -13038,9 +13144,19 @@ string, the filename must be a standard 8bits string.
 @end itemize
 
 In the absence of a @samp{encoding=@var{xxx}} form parameter, the
-value UTF-8 is used. This encoding form parameter is only supported on
-the Windows platform. On the other Operating Systems the runtime is
-supporting UTF-8 natively.
+encoding is controlled by the @samp{GNAT_CODE_PAGE} environment
+variable. And if not set @samp{utf8} is assumed.
+
+@table @samp
+@item CP_ACP
+The current system Windows ANSI code page.
+@item CP_UTF8
+UTF-8 encoding
+@end table
+
+This encoding form parameter is only supported on the Windows
+platform. On the other Operating Systems the run-time is supporting
+UTF-8 natively.
 
 @node Open Modes
 @section Open Modes
@@ -13375,10 +13491,13 @@ of GNAT, and will generate a warning message.
 * Ada.Strings.Wide_Unbounded.Wide_Text_IO (a-swuwti.ads)::
 * Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO (a-szuzti.ads)::
 * Ada.Text_IO.C_Streams (a-tiocst.ads)::
+* Ada.Text_IO.Reset_Standard_Files (a-tirsfi.ads)::
 * Ada.Wide_Characters.Unicode (a-wichun.ads)::
 * Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads)::
+* Ada.Wide_Text_IO.Reset_Standard_Files (a-wrstfi.ads)::
 * Ada.Wide_Wide_Characters.Unicode (a-zchuni.ads)::
 * Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads)::
+* Ada.Wide_Wide_Text_IO.Reset_Standard_Files (a-zrstfi.ads)::
 * GNAT.Altivec (g-altive.ads)::
 * GNAT.Altivec.Conversions (g-altcon.ads)::
 * GNAT.Altivec.Vector_Operations (g-alveop.ads)::
@@ -13439,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)::
@@ -13449,6 +13572,8 @@ of GNAT, and will generate a warning message.
 * GNAT.Spitbol.Table_Boolean (g-sptabo.ads)::
 * GNAT.Spitbol.Table_Integer (g-sptain.ads)::
 * GNAT.Spitbol.Table_VString (g-sptavs.ads)::
+* GNAT.SSE (g-sse.ads)::
+* GNAT.SSE.Vector_Types (g-ssvety.ads)::
 * GNAT.Strings (g-string.ads)::
 * GNAT.String_Split (g-strspl.ads)::
 * GNAT.Table (g-table.ads)::
@@ -13477,6 +13602,7 @@ of GNAT, and will generate a warning message.
 * System.Pool_Local (s-pooloc.ads)::
 * System.Restrictions (s-restri.ads)::
 * System.Rident (s-rident.ads)::
+* System.Strings.Stream_Ops (s-ststop.ads)::
 * System.Task_Info (s-tasinf.ads)::
 * System.Wch_Cnv (s-wchcnv.ads)::
 * System.Wch_Con (s-wchcon.ads)::
@@ -13695,6 +13821,18 @@ C streams and @code{Text_IO}.  The stream identifier can be
 extracted from a file opened on the Ada side, and an Ada file
 can be constructed from a stream opened on the C side.
 
+@node Ada.Text_IO.Reset_Standard_Files (a-tirsfi.ads)
+@section @code{Ada.Text_IO.Reset_Standard_Files} (@file{a-tirsfi.ads})
+@cindex @code{Ada.Text_IO.Reset_Standard_Files} (@file{a-tirsfi.ads})
+@cindex @code{Text_IO} resetting standard files
+
+@noindent
+This procedure is used to reset the status of the standard files used
+by Ada.Text_IO.  This is useful in a situation (such as a restart in an
+embedded application) where the status of the files may change during
+execution (for example a standard input file may be redefined to be
+interactive).
+
 @node Ada.Wide_Characters.Unicode (a-wichun.ads)
 @section @code{Ada.Wide_Characters.Unicode} (@file{a-wichun.ads})
 @cindex @code{Ada.Wide_Characters.Unicode} (@file{a-wichun.ads})
@@ -13715,6 +13853,18 @@ C streams and @code{Wide_Text_IO}.  The stream identifier can be
 extracted from a file opened on the Ada side, and an Ada file
 can be constructed from a stream opened on the C side.
 
+@node Ada.Wide_Text_IO.Reset_Standard_Files (a-wrstfi.ads)
+@section @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@file{a-wrstfi.ads})
+@cindex @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@file{a-wrstfi.ads})
+@cindex @code{Wide_Text_IO} resetting standard files
+
+@noindent
+This procedure is used to reset the status of the standard files used
+by Ada.Wide_Text_IO.  This is useful in a situation (such as a restart in an
+embedded application) where the status of the files may change during
+execution (for example a standard input file may be redefined to be
+interactive).
+
 @node Ada.Wide_Wide_Characters.Unicode (a-zchuni.ads)
 @section @code{Ada.Wide_Wide_Characters.Unicode} (@file{a-zchuni.ads})
 @cindex @code{Ada.Wide_Wide_Characters.Unicode} (@file{a-zchuni.ads})
@@ -13735,6 +13885,18 @@ C streams and @code{Wide_Wide_Text_IO}.  The stream identifier can be
 extracted from a file opened on the Ada side, and an Ada file
 can be constructed from a stream opened on the C side.
 
+@node Ada.Wide_Wide_Text_IO.Reset_Standard_Files (a-zrstfi.ads)
+@section @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@file{a-zrstfi.ads})
+@cindex @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@file{a-zrstfi.ads})
+@cindex @code{Wide_Wide_Text_IO} resetting standard files
+
+@noindent
+This procedure is used to reset the status of the standard files used
+by Ada.Wide_Wide_Text_IO. This is useful in a situation (such as a
+restart in an embedded application) where the status of the files may
+change during execution (for example a standard input file may be
+redefined to be interactive).
+
 @node GNAT.Altivec (g-altive.ads)
 @section @code{GNAT.Altivec} (@file{g-altive.ads})
 @cindex @code{GNAT.Altivec} (@file{g-altive.ads})
@@ -14397,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})
@@ -14507,6 +14702,23 @@ A library level of instantiation of @code{GNAT.Spitbol.Patterns.Table} for
 a variable length string type, giving an implementation of general
 maps from strings to strings.
 
+@node GNAT.SSE (g-sse.ads)
+@section @code{GNAT.SSE} (@file{g-sse.ads})
+@cindex @code{GNAT.SSE} (@file{g-sse.ads})
+
+@noindent
+Root of a set of units aimed at offering Ada bindings to a subset of
+the Intel(r) Streaming SIMD Extensions with GNAT on the x86 family of
+targets.  It exposes vector component types together with a general
+introduction to the binding contents and use.
+
+@node GNAT.SSE.Vector_Types (g-ssvety.ads)
+@section @code{GNAT.SSE.Vector_Types} (@file{g-ssvety.ads})
+@cindex @code{GNAT.SSE.Vector_Types} (@file{g-ssvety.ads})
+
+@noindent
+SSE vector types for use with SSE related intrinsics.
+
 @node GNAT.Strings (g-string.ads)
 @section @code{GNAT.Strings} (@file{g-string.ads})
 @cindex @code{GNAT.Strings} (@file{g-string.ads})
@@ -14819,6 +15031,18 @@ It is not normally necessary to @code{with} this generic package
 since the necessary instantiation is included in
 package System.Restrictions.
 
+@node System.Strings.Stream_Ops (s-ststop.ads)
+@section @code{System.Strings.Stream_Ops} (@file{s-ststop.ads})
+@cindex @code{System.Strings.Stream_Ops} (@file{s-ststop.ads})
+@cindex Stream operations
+@cindex String stream operations
+
+@noindent
+This package provides a set of stream subprograms for standard string types.
+It is intended primarily to support implicit use of such subprograms when
+stream attributes are applied to string types, but the subprograms in this
+package can be used directly by application programs.
+
 @node System.Task_Info (s-tasinf.ads)
 @section @code{System.Task_Info} (@file{s-tasinf.ads})
 @cindex @code{System.Task_Info} (@file{s-tasinf.ads})
@@ -16230,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
@@ -16551,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