* 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
+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.
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
@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})
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;
------------------
/* 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)
("-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;
("-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;