]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 5 Jul 2013 10:27:48 +0000 (12:27 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 5 Jul 2013 10:27:48 +0000 (12:27 +0200)
2013-07-05  Arnaud Charlet  <charlet@adacore.com>

* gnat_rm.texi: Add missing documentation for pragmas.

2013-07-05  Yannick Moy  <moy@adacore.com>

* sem_ch12.adb: Minor comment.

From-SVN: r200702

gcc/ada/ChangeLog
gcc/ada/gnat_rm.texi
gcc/ada/sem_ch12.adb

index 66c293ba5e9577ff8b2a0e7452a0b00561cd3559..46c2dbebaa5124f73227ea6a606635e3d4322bd2 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-05  Arnaud Charlet  <charlet@adacore.com>
+
+       * gnat_rm.texi: Add missing documentation for pragmas.
+
+2013-07-05  Yannick Moy  <moy@adacore.com>
+
+       * sem_ch12.adb: Minor comment.
+
 2013-07-05  Robert Dewar  <dewar@adacore.com>
 
        * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
index 27225435546daad6147c6e67f509520c5cb6e64a..fb7cfa60603878d62188fd6a268aa1d47960d125 100644 (file)
@@ -136,9 +136,11 @@ Implementation Defined Pragmas
 * Pragma Debug_Policy::
 * Pragma Default_Storage_Pool::
 * Pragma Detect_Blocking::
+* Pragma Disable_Atomic_Synchronization::
 * Pragma Dispatching_Domain::
 * Pragma Elaboration_Checks::
 * Pragma Eliminate::
+* Pragma Enable_Atomic_Synchronization::
 * Pragma Export_Exception::
 * Pragma Export_Function::
 * Pragma Export_Object::
@@ -943,9 +945,11 @@ consideration, the use of these pragmas should be minimized.
 * Pragma Debug_Policy::
 * Pragma Default_Storage_Pool::
 * Pragma Detect_Blocking::
+* Pragma Disable_Atomic_Synchronization::
 * Pragma Dispatching_Domain::
 * Pragma Elaboration_Checks::
 * Pragma Eliminate::
+* Pragma Enable_Atomic_Synchronization::
 * Pragma Export_Exception::
 * Pragma Export_Function::
 * Pragma Export_Object::
@@ -2334,6 +2338,31 @@ This is a configuration pragma that forces the detection of potentially
 blocking operations within a protected operation, and to raise Program_Error
 if that happens.
 
+@node Pragma Disable_Atomic_Synchronization
+@unnumberedsec Pragma Disable_Atomic_Synchronization
+@cindex Atomic Synchronization
+@findex Disable_Atomic_Synchronization
+@noindent
+Syntax:
+
+@smallexample @c ada
+pragma Disable_Atomic_Synchronization [(Entity)];
+@end smallexample
+
+@noindent
+Ada requires that accesses (reads or writes) of an atomic variable be
+regarded as synchronization points in the case of multiple tasks.
+Particularly in the case of multi-processors this may require special
+handling, e.g. the generation of memory barriers. This capability may
+be turned off using this pragma in cases where it is known not to be
+required.
+
+The placement and scope rules for this pragma are the same as those
+for @code{pragma Suppress}. In particular it can be used as a
+configuration  pragma, or in a declaration sequence where it applies
+till the end of the scope. If an @code{Entity} argument is present,
+the action applies only to that entity.
+
 @node Pragma Dispatching_Domain
 @unnumberedsec Pragma Dispatching_Domain
 @findex Dispatching_Domain
@@ -2451,6 +2480,33 @@ operation. In this case all the subprograms to which the given operation can
 dispatch are considered to be unused (are never called as a result of a direct
 or a dispatching call).
 
+@node Pragma Enable_Atomic_Synchronization
+@unnumberedsec Pragma Enable_Atomic_Synchronization
+@cindex Atomic Synchronization
+@findex Enable_Atomic_Synchronization
+@noindent
+Syntax:
+
+@smallexample @c ada
+pragma Enable_Atomic_Synchronization [(Entity)];
+@end smallexample
+
+@noindent
+Ada requires that accesses (reads or writes) of an atomic variable be
+regarded as synchronization points in the case of multiple tasks.
+Particularly in the case of multi-processors this may require special
+handling, e.g. the generation of memory barriers. This synchronization
+is performed by default, but can be turned off using
+@code{pragma Disable_Atomic_Synchronization}. The
+@code{Enable_Atomic_Synchronization} pragma can be used to turn
+it back on.
+
+The placement and scope rules for this pragma are the same as those
+for @code{pragma Unsuppress}. In particular it can be used as a
+configuration  pragma, or in a declaration sequence where it applies
+till the end of the scope. If an @code{Entity} argument is present,
+the action applies only to that entity.
+
 @node Pragma Export_Exception
 @unnumberedsec Pragma Export_Exception
 @cindex OpenVMS
@@ -4332,7 +4388,7 @@ pragma No_Run_Time;
 This is an obsolete configuration pragma that historically was used to
 setup what is now called the "zero footprint" library. It causes any
 library units outside this basic library to be ignored. The use of
-this pragma has been superceded by the general configuration run-time
+this pragma has been superceded by the general configurable run-time
 capability of @code{GNAT} where the compiler takes into account whatever
 units happen to be accessible in the library.
 
index 64e75cf6e42ca0054b850a90c8f754648f0320af..ed381b3ce5cf167d93292b8c2cce4f299b878b08 100644 (file)
@@ -4375,8 +4375,9 @@ package body Sem_Ch12 is
         and then (Operating_Mode = Generate_Code
                    or else (Operating_Mode = Check_Semantics
                              and then ASIS_Mode))
-        --  The following line definitely requires comments, why do we
-        --  test Expander_Active and not Full_Expander_Active here ???
+        --  The body is needed when generating code (full expansion), in ASIS
+        --  mode for other tools, and in SPARK mode (special expansion) for
+        --  formal verification of the body itself.
         and then (Expander_Active or ASIS_Mode)
         and then not ABE_Is_Certain (N)
         and then not Is_Eliminated (Subp)