Commit 9c533e7d by Arnaud Charlet Committed by Arnaud Charlet

gnat_rm.texi, [...]: Update documentation.

	* gnat_rm.texi, gnat_ugn.texi,
	doc/gnat_ugn/building_executable_programs_with_gnat.rst,
	doc/gnat_ugn/platform_specific_information.rst,
	doc/gnat_ugn/gnat_and_program_execution.rst,
	doc/gnat_ugn/gnat_utility_programs.rst,
	doc/gnat_ugn/the_gnat_compilation_model.rst,
	doc/gnat_rm/implementation_defined_attributes.rst,
	doc/gnat_rm/the_gnat_library.rst,
	doc/gnat_rm/implementation_defined_pragmas.rst,
	doc/gnat_rm/representation_clauses_and_pragmas.rst,
	doc/gnat_rm/implementation_of_specific_ada_features.rst,
	doc/gnat_rm/implementation_defined_aspects.rst,
	doc/gnat_rm/implementation_defined_characteristics.rst: Update
	documentation.

From-SVN: r247253
parent 211e7410
2017-04-25 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/platform_specific_information.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/representation_clauses_and_pragmas.rst,
doc/gnat_rm/implementation_of_specific_ada_features.rst,
doc/gnat_rm/implementation_defined_aspects.rst,
doc/gnat_rm/implementation_defined_characteristics.rst: Update
documentation.
2017-04-25 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
generating C code on complex case expressions.
......
......@@ -66,8 +66,9 @@ Aspect Abstract_State
This aspect is equivalent to :ref:`pragma Abstract_State<Pragma-Abstract_State>`.
Annotate
========
Aspect Annotate
===============
.. index:: Annotate
There are three forms of this aspect (where ID is an identifier,
......@@ -147,7 +148,7 @@ used when doing formatted output of dimensioned quantities. The syntax is::
This aspect can only be applied to a subtype whose parent type has
a `Dimension_Systen` aspect. The aspect must specify values for
a `Dimension_System` aspect. The aspect must specify values for
all dimensions of the system. The rational values are the powers of the
corresponding dimensions that are used by the compiler to verify that
physical (numeric) computations are dimensionally consistent. For example,
......@@ -361,7 +362,6 @@ This boolean aspect is equivalent to :ref:`pragma Lock_Free<Pragma-Lock_Free>`.
Aspect Max_Queue_Length
=======================
.. index:: Max_Queue_Length
This aspect is equivalent to :ref:`pragma Max_Queue_Length<Pragma-Max_Queue_Length>`.
......
......@@ -1168,7 +1168,7 @@ used in contexts (e.g., preelaborable packages) which require a
static expression and where the function call could not be used
(since the function call is always nonstatic, even if its
argument is static). The argument must be in the range
-(2**(m-1) .. 2**m-1, where m is the memory size
-(2**(m-1)) .. 2**m-1, where m is the memory size
(typically 32 or 64). Negative values are intepreted in a
modular manner (e.g., -1 means the same as 16#FFFF_FFFF# on
a 32 bits machine).
......
......@@ -986,13 +986,13 @@ The policy is the same as that of the underlying threads implementation.
in a pragma `Locking_Policy`. See D.3(4)."
The two implementation defined policies permitted in GNAT are
`Inheritance_Locking` and `Conccurent_Readers_Locking`. On
`Inheritance_Locking` and `Concurrent_Readers_Locking`. On
targets that support the `Inheritance_Locking` policy, locking is
implemented by inheritance, i.e., the task owning the lock operates
at a priority equal to the highest priority of any task currently
requesting the lock. On targets that support the
`Conccurent_Readers_Locking` policy, locking is implemented with a
read/write lock allowing multiple propected object functions to enter
requesting the lock. On targets that support the
`Concurrent_Readers_Locking` policy, locking is implemented with a
read/write lock allowing multiple protected object functions to enter
concurrently.
*
......
......@@ -285,6 +285,31 @@ Note that this simple scheme preserves the relative order of the tasks
that were ready to execute in the priority queue where R has been
placed at the end.
.. Support_for_Locking_Policies
Support for Locking Policies
----------------------------
This section specifies which policies specified by pragma Locking_Policy
are supported on which platforms.
GNAT supports the standard `Ceiling_Locking` policy, and the
implementation defined `Inheritance_Locking` and
`Concurrent_Readers_Locking` policies.
`Ceiling_Locking` is supported on all platforms if the operating system
supports it. In particular, `Ceiling_Locking` is not supported on
VxWorks.
`Inheritance_Locking` is supported on
Linux,
Darwin (Mac OS X),
LynxOS 178,
and VxWorks.
`Concurrent_Readers_Locking` is supported on Linux.
Note that on Linux, `Ceiling_Locking` requires the program to be running
with root privileges. Otherwise, the policy is ignored.
.. _GNAT_Implementation_of_Shared_Passive_Packages:
GNAT Implementation of Shared Passive Packages
......
......@@ -1576,10 +1576,9 @@ check Alignment_Check is suppressed, or if
`pragma Restrictions (No_Elaboration_Code)` is in effect. It is also
suppressed by default on non-strict alignment machines (such as the x86).
Finally, GNAT does not permit overlaying of objects of controlled types or
composite types containing a controlled component. In most cases, the compiler
can detect an attempt at such overlays and will generate a warning at compile
time and a Program_Error exception at run time.
Finally, GNAT does not permit overlaying of objects of class-wide types. In
most cases, the compiler can detect an attempt at such overlays and will
generate a warning at compile time and a Program_Error exception at run time.
.. index:: Export
......
......@@ -2713,6 +2713,8 @@ of the pragma in the :title:`GNAT_Reference_manual`).
* :samp:`-gnatw.h` (holes in record layouts)
* :samp:`-gnatw.j` (late primitives of tagged types)
* :samp:`-gnatw.k` (redefinition of names in standard)
* :samp:`-gnatwl` (elaboration warnings)
......@@ -3186,6 +3188,24 @@ of the pragma in the :title:`GNAT_Reference_manual`).
This switch disables warnings on use of obsolescent features.
.. index:: -gnatw.j (gcc)
:samp:`-gnatw.j`
*Activate warnings on late declarations of tagged type primitives.*
This switch activates warnings on visible primitives added to a
tagged type after deriving a private extension from it.
.. index:: -gnatw.J (gcc)
:samp:`-gnatw.J`
*Suppress warnings on late declarations of tagged type primitives.*
This switch suppresses warnings on visible primitives added to a
tagged type after deriving a private extension from it.
.. index:: -gnatwk (gcc)
:samp:`-gnatwk`
......@@ -6114,7 +6134,7 @@ be presented in subsequent sections.
sized result, for example a function returning an unconstrained
String. There are two ways in which this secondary stack is allocated.
For most targets, the secondary stack is growing on demand and is allocated
For most targets, the secondary stack grows on demand and is allocated
as a chain of blocks in the heap. The -D option is not very
relevant. It only give some control over the size of the allocated
blocks (whose size is the minimum of the default secondary stack size value,
......
......@@ -3354,7 +3354,7 @@ and similarly for `Mass`, `Time`, `Electric_Current`,
The package also defines conventional names for values of each unit, for
example:
.. code-block":: ada
.. code-block:: ada
m : constant Length := 1.0;
kg : constant Mass := 1.0;
......
......@@ -237,6 +237,20 @@ value greater than 0.0, or else use the corresponding *-T*
binder option.
To make sure a program is running as root, you can put something like
this in a library package body in your application:
.. code-block:: ada
function geteuid return Integer;
pragma Import (C, geteuid, "geteuid");
Ignore : constant Boolean :=
(if geteuid = 0 then True else raise Program_Error with "must be root");
It gets the effective user id, and if it's not 0 (i.e. root), it raises
Program_Error.
.. index:: Solaris Sparc threads libraries
.. _Solaris-Specific_Considerations:
......@@ -2215,7 +2229,7 @@ This setting can be done with *gnatlink* using either of the following:
This sets the stack reserve size to 0x1000000 bytes. Note that with
*-Wl* option it is not possible to set the stack commit size
because the coma is a separator for this option.
because the comma is a separator for this option.
.. _Setting_Heap_Size_from_gnatlink:
......@@ -2244,7 +2258,7 @@ Under Windows systems, it is possible to specify the program heap size from
This sets the heap reserve size to 0x1000000 bytes. Note that with
*-Wl* option it is not possible to set the heap commit size
because the coma is a separator for this option.
because the comma is a separator for this option.
.. _Win32_Specific_Addons:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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