aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-01-07 11:15:18 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-01-07 11:15:18 +0100
commit6a989c79d4ac94a8922e97523ff13965ed5b0283 (patch)
treeb237f7a384cd6d29be7cca594f2ba682e4c498f7 /gcc
parent1c85591cabcde20a01a2ecb90d857625a5681ae4 (diff)
downloadgcc-6a989c79d4ac94a8922e97523ff13965ed5b0283.zip
gcc-6a989c79d4ac94a8922e97523ff13965ed5b0283.tar.gz
gcc-6a989c79d4ac94a8922e97523ff13965ed5b0283.tar.bz2
[multiple changes]
2015-01-07 Vincent Celier <celier@adacore.com> * clean.adb: Minor error message change. 2015-01-07 Tristan Gingold <gingold@adacore.com> PR ada/64349 * env.c (__gnat_environ): Adjust for darwin9/darwin10. 2015-01-07 Javier Miranda <miranda@adacore.com> * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq protect the frontend against never ending recursion caused by circularities in the sources. From-SVN: r219290
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/clean.adb2
-rw-r--r--gcc/ada/env.c8
-rw-r--r--gcc/ada/sem_ch10.adb12
4 files changed, 36 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ed5e352..47a8051 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,18 @@
+2015-01-07 Vincent Celier <celier@adacore.com>
+
+ * clean.adb: Minor error message change.
+
+2015-01-07 Tristan Gingold <gingold@adacore.com>
+
+ PR ada/64349
+ * env.c (__gnat_environ): Adjust for darwin9/darwin10.
+
+2015-01-07 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
+ protect the frontend against never ending recursion caused by
+ circularities in the sources.
+
2015-01-07 Robert Dewar <dewar@adacore.com>
* a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb
index 5d892e3..a9dede5 100644
--- a/gcc/ada/clean.adb
+++ b/gcc/ada/clean.adb
@@ -1388,7 +1388,7 @@ package body Clean is
if Project_File_Name /= null then
Put_Line
("warning: gnatclean -P is obsolete and will not be available " &
- "in the next release. Use gprclean instead.");
+ "in the next release; use gprclean instead.");
end if;
-- A project file was specified by a -P switch
diff --git a/gcc/ada/env.c b/gcc/ada/env.c
index 95308130..f8608bc 100644
--- a/gcc/ada/env.c
+++ b/gcc/ada/env.c
@@ -44,6 +44,12 @@
#include <stdlib.h>
#endif
+#if defined (__APPLE__) && !defined (__arm__)
+/* On Darwin, _NSGetEnviron must be used for shared libraries; but it is not
+ available on iOS. */
+#include <crt_externs.h>
+#endif
+
#if defined (__vxworks)
#if defined (__RTP__)
/* On VxWorks 6 Real-Time process mode, environ is defined in unistd.h. */
@@ -212,6 +218,8 @@ __gnat_environ (void)
#elif ! (defined (__vxworks))
extern char **environ;
return environ;
+#elif defined (__APPLE__) && !defined (__arm__)
+ return *_NSGetEnviron ();
#else
return environ;
#endif
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 3f47dee..5e66316 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -2521,6 +2521,18 @@ package body Sem_Ch10 is
return;
end if;
+ -- If we are compiling under "don't quit" mode (-gnatq) and we have
+ -- already detected serious errors then we mark the with-clause nodes as
+ -- analyzed before the corresponding compilation unit is analyzed. This
+ -- is done here to protect the frontend against never ending recursion
+ -- caused by circularities in the sources (because the previous errors
+ -- may break the regular machine of the compiler implemented in
+ -- Load_Unit to detect circularities).
+
+ if Serious_Errors_Detected > 0 and then Try_Semantics then
+ Set_Analyzed (N);
+ end if;
+
-- If the library unit is a predefined unit, and we are in high
-- integrity mode, then temporarily reset Configurable_Run_Time_Mode
-- for the analysis of the with'ed unit. This mode does not prevent