Commit 0f1b0456 by Geert Bosch Committed by Arnaud Charlet

gnat_ugn.texi: Remove extended inline assembly example...

2005-03-08  Geert Bosch  <bosch@adacore.com>
	    Arnaud Charlet  <charlet@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Cyrille Comar  <comar@adacore.com>
	    Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Remove extended inline assembly example, as it was far
	too specific and long-winded to be appropriate for the GNAT User's
	Guide.
	Warn about use of GCC switches not documented in the GNAT User's Guide,
	as these may cause generated code to not conform to Ada semantics.
	Remove mention of -gdwarf-2 for sparc64, since this is now the default.
	Add documentation for -gnat95 and -gnat05 switches
	Remove paragraph documenting obsolete way to refer to third party
	libraries.
	Add a few references to Ada_05 that were missing.
	Update documentation on -gnatZ/-gnatL.
	Document limitation when using -m64 under Solaris.
	Change the "Name Casing" subsection of the pretty-printer section
	according to the changes in the dictionary processing.

	* gnat_rm.texi: Document the Ada_05 pragma.
	Section on record representation clauses describes the new more
	relaxed rules about placement of large packed bit array components.
	Add documentation of GNAT.UTF_32

From-SVN: r96513
parent 1a49cf99
...@@ -102,6 +102,7 @@ Implementation Defined Pragmas ...@@ -102,6 +102,7 @@ Implementation Defined Pragmas
* Pragma Abort_Defer:: * Pragma Abort_Defer::
* Pragma Ada_83:: * Pragma Ada_83::
* Pragma Ada_95:: * Pragma Ada_95::
* Pragma Ada_05::
* Pragma Annotate:: * Pragma Annotate::
* Pragma Assert:: * Pragma Assert::
* Pragma Ast_Entry:: * Pragma Ast_Entry::
...@@ -629,6 +630,7 @@ consideration, the use of these pragmas should be minimized. ...@@ -629,6 +630,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Abort_Defer:: * Pragma Abort_Defer::
* Pragma Ada_83:: * Pragma Ada_83::
* Pragma Ada_95:: * Pragma Ada_95::
* Pragma Ada_05::
* Pragma Annotate:: * Pragma Annotate::
* Pragma Assert:: * Pragma Assert::
* Pragma Ast_Entry:: * Pragma Ast_Entry::
...@@ -781,6 +783,24 @@ contexts. This pragma is useful when writing a reusable component that ...@@ -781,6 +783,24 @@ contexts. This pragma is useful when writing a reusable component that
itself uses Ada 95 features, but which is intended to be usable from itself uses Ada 95 features, but which is intended to be usable from
either Ada 83 or Ada 95 programs. either Ada 83 or Ada 95 programs.
@node Pragma Ada_05
@unnumberedsec Pragma Ada_05
@findex Ada_05
@noindent
Syntax:
@smallexample @c ada
pragma Ada_05;
@end smallexample
@noindent
A configuration pragma that establishes Ada 2005 mode for the unit to which
it applies, regardless of the mode set by the command line switches.
This mode is set automatically for the @code{Ada} and @code{System}
packages and their children, so you need not specify it in these
contexts. This pragma is useful when writing a reusable component that
itself uses Ada 2005 features, but which is intended to be usable from
either Ada 83 or Ada 95 programs.
@node Pragma Annotate @node Pragma Annotate
@unnumberedsec Pragma Annotate @unnumberedsec Pragma Annotate
@findex Annotate @findex Annotate
...@@ -9553,15 +9573,34 @@ thus the same lack of restriction applies. For example, if you declare: ...@@ -9553,15 +9573,34 @@ thus the same lack of restriction applies. For example, if you declare:
then a component clause for a component of type R may start on any then a component clause for a component of type R may start on any
specified bit boundary, and may specify a value of 49 bits or greater. specified bit boundary, and may specify a value of 49 bits or greater.
Packed bit arrays that are longer than 64 bits must always be placed For packed bit arrays that are longer than 64 bits, there are two
on a storage unit (byte) boundary. Any component clause that does not cases. If the component size is a power of 2 (1,2,4,8,16,32 bits),
including the important case of single bits or boolean values, then
there are no limitations on placement of such components, and they
may start and end at arbitrary bit boundaries.
If the component size is not a power of 2 (e.g. 3 or 5), then
an array of this type longer than 64 bits must always be placed on
on a storage unit (byte) boundary and occupy an integral number
of storage units (bytes). Any component clause that does not
meet this requirement will be rejected. meet this requirement will be rejected.
The rules for other types are different for GNAT 3 and GNAT 5 versions Any aliased component, or component of an aliased type, must
(based on GCC 2 and GCC 3 respectively). In GNAT 5, larger components have its normal alignment and size. A component clause that
(other than packed arrays) does not meet this requirement will be rejected.
may also be placed on arbitrary boundaries, so for example, the following
is permitted: The tag field of a tagged type always occupies an address sized field at
the start of the record. No component clause may attempt to overlay this
tag. When a tagged type appears as a component, the tag field must have
proper alignment
In the case of a record extension T1, of a type T, no component clause applied
to the type T1 can specify a storage location that would overlap the first
T'Size bytes of the record.
For all other component types, including non-bit-packed arrays,
the component can be placed at an arbitrary bit boundary,
so for example, the following is permitted:
@smallexample @c ada @smallexample @c ada
type R is array (1 .. 10) of Boolean; type R is array (1 .. 10) of Boolean;
...@@ -9581,23 +9620,13 @@ is permitted: ...@@ -9581,23 +9620,13 @@ is permitted:
@end smallexample @end smallexample
@noindent @noindent
Note: the above rules apply to recent releases of GNAT 5.
In GNAT 3, there are more severe restrictions on larger components. In GNAT 3, there are more severe restrictions on larger components.
For non-primitive types, including packed arrays with a size greater than For non-primitive types, including packed arrays with a size greater than
64 bits, component clauses must respect the alignment requirement of the 64 bits, component clauses must respect the alignment requirement of the
type, in particular, always starting on a byte boundary, and the length type, in particular, always starting on a byte boundary, and the length
must be a multiple of the storage unit. must be a multiple of the storage unit.
The following rules regarding tagged types are enforced in both GNAT 3 and
GNAT 5:
The tag field of a tagged type always occupies an address sized field at
the start of the record. No component clause may attempt to overlay this
tag.
In the case of a record extension T1, of a type T, no component clause applied
to the type T1 can specify a storage location that would overlap the first
T'Size bytes of the record.
@node Enumeration Clauses @node Enumeration Clauses
@section Enumeration Clauses @section Enumeration Clauses
...@@ -11810,6 +11839,7 @@ of GNAT, and will generate a warning message. ...@@ -11810,6 +11839,7 @@ of GNAT, and will generate a warning message.
* GNAT.Spitbol.Table_VString (g-sptavs.ads):: * GNAT.Spitbol.Table_VString (g-sptavs.ads)::
* GNAT.Strings (g-string.ads):: * GNAT.Strings (g-string.ads)::
* GNAT.String_Split (g-strspl.ads):: * GNAT.String_Split (g-strspl.ads)::
* GNAT.UTF_32 (g-utf_32.ads)::
* GNAT.Table (g-table.ads):: * GNAT.Table (g-table.ads)::
* GNAT.Task_Lock (g-tasloc.ads):: * GNAT.Task_Lock (g-tasloc.ads)::
* GNAT.Threads (g-thread.ads):: * GNAT.Threads (g-thread.ads)::
...@@ -12670,6 +12700,22 @@ a string wherever the separators appear, and provide direct access ...@@ -12670,6 +12700,22 @@ a string wherever the separators appear, and provide direct access
to the resulting slices. This package is instantiated from to the resulting slices. This package is instantiated from
@code{GNAT.Array_Split}. @code{GNAT.Array_Split}.
@node GNAT.UTF_32 (g-utf_32.ads)
@section @code{GNAT.UTF_32} (@file{g-table.ads})
@cindex @code{GNAT.UTF_32} (@file{g-table.ads})
@cindex Wide character codes
@noindent
This is a package intended to be used in conjunction with the
@code{Wide_Character} type in Ada 95 and the
@code{Wide_Wide_Character} type in Ada 2005 (available
in @code{GNAT} in Ada 2005 mode). This package contains
Unicode categorization routines, as well as lexical
categorization routines corresponding to the Ada 2005
lexical rules for identifiers and strings, and also a
lower case to upper case fold routine corresponding to
the Ada 2005 rules for identifier equivalence.
@node GNAT.Table (g-table.ads) @node GNAT.Table (g-table.ads)
@section @code{GNAT.Table} (@file{g-table.ads}) @section @code{GNAT.Table} (@file{g-table.ads})
@cindex @code{GNAT.Table} (@file{g-table.ads}) @cindex @code{GNAT.Table} (@file{g-table.ads})
...@@ -12709,7 +12755,7 @@ Provides facilities for creating and destroying threads with explicit calls. ...@@ -12709,7 +12755,7 @@ Provides facilities for creating and destroying threads with explicit calls.
These threads are known to the GNAT run-time system. These subprograms are These threads are known to the GNAT run-time system. These subprograms are
exported C-convention procedures intended to be called from foreign code. exported C-convention procedures intended to be called from foreign code.
By using these primitives rather than directly calling operating systems By using these primitives rather than directly calling operating systems
routines, compatibility with the Ada tasking runt-time is provided. routines, compatibility with the Ada tasking run-time is provided.
@node GNAT.Traceback (g-traceb.ads) @node GNAT.Traceback (g-traceb.ads)
@section @code{GNAT.Traceback} (@file{g-traceb.ads}) @section @code{GNAT.Traceback} (@file{g-traceb.ads})
......
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