aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog16
-rw-r--r--gcc/ada/adaint.c2
-rw-r--r--gcc/ada/gnat_ugn.texi5
-rw-r--r--gcc/ada/sem_ch13.adb12
-rw-r--r--gcc/ada/socket.c4
-rw-r--r--gcc/ada/switch-c.adb17
6 files changed, 34 insertions, 22 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 33e45e9..77c7a7f 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 6e0e4a3d..9bfb689 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -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
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 57939c3..04633a2 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -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})
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index b89bd74..317510a 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -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;
------------------
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c
index ab5368f..310de25 100644
--- a/gcc/ada/socket.c
+++ b/gcc/ada/socket.c
@@ -31,6 +31,10 @@
/* 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)
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index e2f7c2e..04a6fa1 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -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;