summaryrefslogtreecommitdiff
path: root/gcc/ada/par-prag.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-12 10:32:58 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-12 10:32:58 +0000
commit1e3c4ae64931c1666aad772c583a62514b53f50a (patch)
tree8af4d89af00b768007bd849898eda91e84c78a80 /gcc/ada/par-prag.adb
parent94153a42dadbfd2814a1341fe6305fbb6ef5939c (diff)
downloadgcc-1e3c4ae64931c1666aad772c583a62514b53f50a.tar.gz
2010-10-12 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma * gnat_rm.texi (pragma Suppress_All): Document new placement rules * par-prag.adb (P_Pragma, case Suppress_All): Set Has_Pragma_Suppress_All flag. * sem_prag.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma (Analyze_Pragma, case Suppress_All): Remove placement check (Process_Compilation_Unit_Pragmas): Use Has_Pragma_Suppress_All flag * sem_prag.ads (Process_Compilation_Unit_Pragmas): Update documentation * sinfo.adb (Has_Pragma_Suppress_All): New flag (Has_Pragma_Priority): New name for Has_Priority_Pragma * sinfo.ads (Has_Pragma_Suppress_All): New flag (Has_Pragma_Priority): New name for Has_Priority_Pragma 2010-10-12 Arnaud Charlet <charlet@adacore.com> * lib-xref.ads: Mark j/J as reserved for C++ classes. 2010-10-12 Jose Ruiz <ruiz@adacore.com> * a-exetim-default.ads, a-exetim-posix.adb: New. * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for linux): Use the POSIX Realtime support to implement CPU clocks. (EXTRA_GNATRTL_TASKING_OBJS for linux): Add the a-exetim.o object to the tasking library. (THREADSLIB): Make the POSIX.1b Realtime Extensions library (librt) available for shared libraries. * gcc-interface/Make-lang.in: Update dependencies. 2010-10-12 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post, break apart expressions with AND THEN clauses into separate pragmas. * sinput.ads, sinput.adab (Get_Logical_Line_Number_Img): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165356 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-prag.adb')
-rw-r--r--gcc/ada/par-prag.adb28
1 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb
index be94746765c..109326cc183 100644
--- a/gcc/ada/par-prag.adb
+++ b/gcc/ada/par-prag.adb
@@ -982,6 +982,33 @@ begin
end if;
end Style_Checks;
+ -------------------------
+ -- Suppress_All (GNAT) --
+ -------------------------
+
+ -- pragma Suppress_All
+
+ -- This is a rather odd pragma, because other compilers allow it in
+ -- strange places. DEC allows it at the end of units, and Rational
+ -- allows it as a program unit pragma, when it would be more natural
+ -- if it were a configuration pragma.
+
+ -- Since the reason we provide this pragma is for compatibility with
+ -- these other compilers, we want to accomodate these strange placement
+ -- rules, and the easiest thing is simply to allow it anywhere in a
+ -- unit. If this pragma appears anywhere within a unit, then the effect
+ -- is as though a pragma Suppress (All_Checks) had appeared as the first
+ -- line of the current file, i.e. as the first configuration pragma in
+ -- the current unit.
+
+ -- To get this effect, we set the flag Has_Pragma_Suppress_All in the
+ -- compilation unit node for the current source file then in the last
+ -- stage of parsing a file, if this flag is set, we materialize the
+ -- Suppress (All_Checks) pragma, marked as not coming from Source.
+
+ when Pragma_Suppress_All =>
+ Set_Has_Pragma_Suppress_All (Cunit (Current_Source_Unit));
+
---------------------
-- Warnings (GNAT) --
---------------------
@@ -1204,7 +1231,6 @@ begin
Pragma_Stream_Convert |
Pragma_Subtitle |
Pragma_Suppress |
- Pragma_Suppress_All |
Pragma_Suppress_Debug_Info |
Pragma_Suppress_Exception_Locations |
Pragma_Suppress_Initialization |