]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-07-18 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2014 09:37:41 +0000 (09:37 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Jul 2014 09:37:41 +0000 (09:37 +0000)
* gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
* switch-c.adb: Remove prohibition of -gnatR and -gnatc together.

2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>

* sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
on the null statement.

2014-07-18  Thomas Quinot  <quinot@adacore.com>

* adaint.c: Minor comment rewording.
* socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
use of errno in this file is thread safe.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212791 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/adaint.c
gcc/ada/gnat_ugn.texi
gcc/ada/sem_ch13.adb
gcc/ada/socket.c
gcc/ada/switch-c.adb

index 33e45e970a3524813949e6ab6bcee2d82037f35b..77c7a7f8c6c59e395ea3f6bfd5c22477209c5632 100644 (file)
@@ -1,3 +1,19 @@
+2014-07-18  Robert Dewar  <dewar@adacore.com>
+
+       * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
+       * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
+
+2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
+       on the null statement.
+
+2014-07-18  Thomas Quinot  <quinot@adacore.com>
+
+       * adaint.c: Minor comment rewording.
+       * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
+       use of errno in this file is thread safe.
+
 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
 
        * gnat_ugn.texi: Doc clarification.
index 6e0e4a3db0ef23cb237ed405ddc6fcb8eb2c84a9..9bfb6895f33079c6fc60a0a07a3fc3400166077a 100644 (file)
@@ -34,7 +34,7 @@
    package Osint.  Many of the subprograms in OS_Lib import standard
    library calls directly. This file contains all other routines.  */
 
-/* Ensure accesses to errno are thread safe.  */
+/* Ensure access to errno is thread safe.  */
 #define _REENTRANT
 #define _THREAD_SAFE
 
index 57939c3d6b7f9551aa9f56f77ebee91f01d348ac..04633a2392008b96349d44d85ab8d9550e5a14e7 100644 (file)
@@ -4213,13 +4213,10 @@ Treat pragma Restrictions as Restriction_Warnings.
 @cindex @option{-gnatR} (@command{gcc})
 Output representation information for declared types and objects.
 Note that this switch is not allowed if a previous @code{-gnatD} switch has
-been given, since these two switches are not compatible. It is also not allowed
-if a previous @code{-gnatc} switch has been given, since we must be generating
-code to be able to determine representation information.
+been given, since these two switches are not compatible.
 
 @item ^-gnatRm[s]^/REPRESENTATION_INFO^
 Output convention and parameter passing mechanisms for all subprograms.
-This form is also incompatible with the use of @code{-gnatc}.
 
 @item -gnats
 @cindex @option{-gnats} (@command{gcc})
index b89bd74c76f62cda65057a74726ffce6383179ca..317510ada17060956287078d2b848ec48d854638 100644 (file)
@@ -10295,7 +10295,19 @@ package body Sem_Ch13 is
    procedure Kill_Rep_Clause (N : Node_Id) is
    begin
       pragma Assert (Ignore_Rep_Clauses);
+
+      --  Note: we use Replace rather than Rewrite, because we don't want
+      --  ASIS to be able to use Original_Node to dig out the (undecorated)
+      --  rep clause that is being replaced.
+
       Replace (N, Make_Null_Statement (Sloc (N)));
+
+      --  The null statement must be marked as not coming from source. This is
+      --  so that ASIS ignores if, and also the back end does not expect bogus
+      --  "from source" null statements in weird places (e.g. in declarative
+      --  regions where such null statements are not allowed).
+
+      Set_Comes_From_Source (N, False);
    end Kill_Rep_Clause;
 
    ------------------
index ab5368f6d0c2e7aaa5f75d8bff54f0c134d3ada3..310de25029f870929a2c979cbd66ffa677249ba5 100644 (file)
 
 /*  This file provides a portable binding to the sockets API                */
 
+/* Ensure access to errno is thread safe.  */
+#define _REENTRANT
+#define _THREAD_SAFE
+
 #include "gsocket.h"
 
 #if defined(VMS)
index e2f7c2ec494e6669292865f938ae2a48cc836c19..04a6fa188f36b4de536ca4e5c4b3c05ba6fd32fc 100644 (file)
@@ -310,15 +310,6 @@ package body Switch.C is
                     ("-gnatc must be first if combined with other switches");
                end if;
 
-               --  Not allowed if previous -gnatR given
-
-               if List_Representation_Info /= 0
-                 or else List_Representation_Info_Mechanisms
-               then
-                  Osint.Fail
-                    ("-gnatc not allowed since -gnatR given previously");
-               end if;
-
                Ptr := Ptr + 1;
                Operating_Mode := Check_Semantics;
 
@@ -1057,14 +1048,6 @@ package body Switch.C is
                     ("-gnatR not permitted since -gnatD given previously");
                end if;
 
-               --  Not allowed if previous -gnatc was given, since we must
-               --  call the code generator to determine rep information.
-
-               if Operating_Mode = Check_Semantics then
-                  Osint.Fail
-                    ("-gnatR not permitted since -gnatc given previously");
-               end if;
-
                --  Set to annotate rep info, and set default -gnatR mode
 
                Back_Annotate_Rep_Info := True;