aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 16:11:43 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 16:11:43 +0200
commita9bbfbd052c4a6572ec8c46149549e046f7e0ed1 (patch)
tree1abd647c917b89f192eaaf92c9bbddcb0d7eaadf /gcc
parent8bc598fffb6b83ca7c55e3d5abb0d12b82d2449d (diff)
downloadgcc-a9bbfbd052c4a6572ec8c46149549e046f7e0ed1.zip
gcc-a9bbfbd052c4a6572ec8c46149549e046f7e0ed1.tar.gz
gcc-a9bbfbd052c4a6572ec8c46149549e046f7e0ed1.tar.bz2
[multiple changes]
2014-10-20 Arnaud Charlet <charlet@adacore.com> * set_targ.adb (Write_Target_Dependent_Values, Write_Line): Fix calling C APIs with no trailing NUL char by calling better wrappers instead. 2014-10-20 Tristan Gingold <gingold@adacore.com> * gnat_ugn.texi: Document that gdb users must be in group _developer on mac os. 2014-10-20 Arnaud Charlet <charlet@adacore.com> * a-tgdico.ads: Fix typo. 2014-10-20 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Convert_To_Assignments): Do not create a transient scope for a component whose type requires it, if the context is an initialization procedure, because the target of the assignment must be visible outside of the block. 2014-10-20 Tristan Gingold <gingold@adacore.com> * tracebak.c: Define PC_ADJUST for arm-darwin. * env.c: Remove darwin specific code. * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin. 2014-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view is incomplete rather than private, and full type declaration has aspects, analyze aspects on the full view rather than the incomplete view, to prevent freezing anomalies with the class-wide type. From-SVN: r216470
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog36
-rw-r--r--gcc/ada/a-tgdico.ads2
-rw-r--r--gcc/ada/env.c7
-rw-r--r--gcc/ada/exp_aggr.adb11
-rw-r--r--gcc/ada/gnat_ugn.texi3
-rw-r--r--gcc/ada/raise-gcc.c7
-rw-r--r--gcc/ada/sem_ch3.adb11
-rwxr-xr-xgcc/ada/set_targ.adb4
-rw-r--r--gcc/ada/tracebak.c2
9 files changed, 69 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 70bad2f..a304daa 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,39 @@
+2014-10-20 Arnaud Charlet <charlet@adacore.com>
+
+ * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
+ Fix calling C APIs with no trailing NUL char by calling better
+ wrappers instead.
+
+2014-10-20 Tristan Gingold <gingold@adacore.com>
+
+ * gnat_ugn.texi: Document that gdb users must be in group
+ _developer on mac os.
+
+2014-10-20 Arnaud Charlet <charlet@adacore.com>
+
+ * a-tgdico.ads: Fix typo.
+
+2014-10-20 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_aggr.adb (Convert_To_Assignments): Do not create a
+ transient scope for a component whose type requires it, if the
+ context is an initialization procedure, because the target of
+ the assignment must be visible outside of the block.
+
+2014-10-20 Tristan Gingold <gingold@adacore.com>
+
+ * tracebak.c: Define PC_ADJUST for arm-darwin.
+ * env.c: Remove darwin specific code.
+ * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
+
+2014-10-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
+ is incomplete rather than private, and full type declaration
+ has aspects, analyze aspects on the full view rather than
+ the incomplete view, to prevent freezing anomalies with the
+ class-wide type.
+
2014-10-17 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Expand_N_Task_Body): Add defense against
diff --git a/gcc/ada/a-tgdico.ads b/gcc/ada/a-tgdico.ads
index 6da9001..3aae768 100644
--- a/gcc/ada/a-tgdico.ads
+++ b/gcc/ada/a-tgdico.ads
@@ -14,7 +14,7 @@
------------------------------------------------------------------------------
pragma Warnings (Off);
--- Turn of categorization warnings
+-- Turn off categorization warnings
generic
type T (<>) is abstract tagged limited private;
diff --git a/gcc/ada/env.c b/gcc/ada/env.c
index de5e08a..95308130 100644
--- a/gcc/ada/env.c
+++ b/gcc/ada/env.c
@@ -76,10 +76,6 @@
extern "C" {
#endif
-#if defined (__APPLE__)
-#include <crt_externs.h>
-#endif
-
#ifdef VMS
#include <vms/descrip.h>
#endif
@@ -208,9 +204,6 @@ __gnat_environ (void)
#if defined (VMS) || defined (RTX)
/* Not implemented */
return NULL;
-#elif defined (__APPLE__)
- char ***result = _NSGetEnviron ();
- return *result;
#elif defined (__MINGW32__)
return _environ;
#elif defined (sun)
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index a3049dd..ac67a57 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -3396,7 +3396,7 @@ package body Exp_Aggr is
-- that any finalization chain will be associated with that scope.
-- For extended returns, we delay expansion to avoid the creation
-- of an unwanted transient scope that could result in premature
- -- finalization of the return object (which is built in in place
+ -- finalization of the return object (which is built in place
-- within the caller's scope).
or else
@@ -3409,7 +3409,14 @@ package body Exp_Aggr is
return;
end if;
- if Requires_Transient_Scope (Typ) then
+ -- Otherwise, if a transient scope is required, create it now. If we
+ -- are within an initialization procedure do not create such, because
+ -- the target of the assignment must not be declared within a local
+ -- block, and because cleanup will take place on return from the
+ -- initialization procedure.
+ -- Should the condition be more restrictive ???
+
+ if Requires_Transient_Scope (Typ) and then not Inside_Init_Proc then
Establish_Transient_Scope (N, Sec_Stack => Needs_Finalization (Typ));
end if;
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 846fa03..f586f87 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -29282,7 +29282,8 @@ codesign -f -s "gdb-cert" <gnat_install_prefix>/bin/gdb
... where "gdb-cert" should be replaced by the actual certificate
name chosen above, and <gnat_install_prefix> should be replaced by
-the location where you installed GNAT.
+the location where you installed GNAT. Also, be sure that users are
+in the Unix group @samp{_developer}.
@c **********************************
@c * GNU Free Documentation License *
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 747a9de..507412b 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -1384,7 +1384,14 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
void *argument)
{
#ifdef __USING_SJLJ_EXCEPTIONS__
+
+# if defined (__APPLE__) && defined (__arm__)
+ /* There is not ForcedUnwind routine in ios system library. */
+ return _URC_FATAL_PHASE1_ERROR;
+# else
return _Unwind_SjLj_ForcedUnwind (e, handler, argument);
+# endif
+
#else
return _Unwind_ForcedUnwind (e, handler, argument);
#endif
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 473bff8..608307e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -2777,9 +2777,18 @@ package body Sem_Ch3 is
-- them to the entity for the type which is currently the partial
-- view, but which is the one that will be frozen.
+ -- In most cases the partial view is a private type, and both views
+ -- appear in different declarative parts. In the unusual case where the
+ -- partial view is incomplete, perform the analysis on the full view,
+ -- to prevent freezing anomalies with the corresponding class-wide type,
+ -- which otherwise might be frozen before the dispatch table is built.
+
if Has_Aspects (N) then
- if Prev /= Def_Id then
+ if Prev /= Def_Id
+ and then Ekind (Prev) /= E_Incomplete_Type
+ then
Analyze_Aspect_Specifications (N, Prev);
+
else
Analyze_Aspect_Specifications (N, Def_Id);
end if;
diff --git a/gcc/ada/set_targ.adb b/gcc/ada/set_targ.adb
index 46f40cc..8c201ea 100755
--- a/gcc/ada/set_targ.adb
+++ b/gcc/ada/set_targ.adb
@@ -370,7 +370,7 @@ package body Set_Targ is
AddC (ASCII.LF);
if Buflen /= Write (Fdesc, Buffer'Address, Buflen) then
- Delete_File (Target_Dependent_Info_Write_Name'Address, OK);
+ Delete_File (Target_Dependent_Info_Write_Name.all, OK);
Fail ("disk full writing file "
& Target_Dependent_Info_Write_Name.all);
end if;
@@ -382,7 +382,7 @@ package body Set_Targ is
begin
Fdesc :=
- Create_File (Target_Dependent_Info_Write_Name.all'Address, Text);
+ Create_File (Target_Dependent_Info_Write_Name.all, Text);
if Fdesc = Invalid_FD then
Fail ("cannot create file " & Target_Dependent_Info_Write_Name.all);
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 54ec90f..d5f9b9c 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -272,6 +272,8 @@ __gnat_backtrace (void **array,
#define PC_ADJUST -2
#elif defined (__ppc__) || defined (__ppc64__)
#define PC_ADJUST -4
+#elif defined (__arm__)
+#define PC_ADJUST -2
#else
#error Unhandled darwin architecture.
#endif