diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-05 12:27:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-05 12:27:48 +0200 |
commit | af6258ba31d260571d8379ee8a800c56851564bc (patch) | |
tree | ecb5cde9d0b4b32be11e3e3b37af98f1e5993837 | |
parent | 4d20c9591561bea6f51240d350303169773c2a2a (diff) | |
download | gcc-af6258ba31d260571d8379ee8a800c56851564bc.zip gcc-af6258ba31d260571d8379ee8a800c56851564bc.tar.gz gcc-af6258ba31d260571d8379ee8a800c56851564bc.tar.bz2 |
[multiple changes]
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
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 58 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 5 |
3 files changed, 68 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 66c293b..46c2dbe 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 2722543..fb7cfa6 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -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. diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 64e75cf..ed381b3 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -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) |