[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
This commit is contained in:
Arnaud Charlet 2014-10-20 16:11:43 +02:00
parent 8bc598fffb
commit a9bbfbd052
9 changed files with 69 additions and 14 deletions

View File

@ -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

View File

@ -14,7 +14,7 @@
------------------------------------------------------------------------------
pragma Warnings (Off);
-- Turn of categorization warnings
-- Turn off categorization warnings
generic
type T (<>) is abstract tagged limited private;

View File

@ -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)

View File

@ -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;

View File

@ -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 *

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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