Commit 758ad973 by Arnaud Charlet

[multiple changes]

2012-06-14  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch9.adb: Minor reformatting.

2012-06-14  Thomas Quinot  <quinot@adacore.com>

	* freeze.adb (Freeze_Record_Type): Warn about useless bit order
	specification [when there's no component clause] regardless
	of whether the specified bit order is reversed or not.

2012-06-14  Tristan Gingold  <gingold@adacore.com>

	* raise-gcc.c (__gnat_personality_seh0): New function.

2012-06-14  Tristan Gingold  <gingold@adacore.com>

	* gnatname.adb (Gnatname): Make sure that dynamic table
	argument_data is initialized.

2012-06-14  Robert Dewar  <dewar@adacore.com>

	* sem_aux.adb: Minor code reorganization.

From-SVN: r188608
parent 34f3a701
2012-06-14 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb: Minor reformatting.
2012-06-14 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Freeze_Record_Type): Warn about useless bit order
specification [when there's no component clause] regardless
of whether the specified bit order is reversed or not.
2012-06-14 Tristan Gingold <gingold@adacore.com>
* raise-gcc.c (__gnat_personality_seh0): New function.
2012-06-14 Tristan Gingold <gingold@adacore.com>
* gnatname.adb (Gnatname): Make sure that dynamic table
argument_data is initialized.
2012-06-14 Robert Dewar <dewar@adacore.com>
* sem_aux.adb: Minor code reorganization.
2012-06-14 Vincent Pucci <pucci@adacore.com> 2012-06-14 Vincent Pucci <pucci@adacore.com>
* einfo.adb einfo.ads (Get_Rep_Item): Removed. * einfo.adb einfo.ads (Get_Rep_Item): Removed.
......
...@@ -13668,7 +13668,7 @@ package body Exp_Ch9 is ...@@ -13668,7 +13668,7 @@ package body Exp_Ch9 is
Args := New_List; Args := New_List;
-- Priority parameter. Set to Unspecified_Priority unless there is a -- Priority parameter. Set to Unspecified_Priority unless there is a
-- priority rep item, in which case we take the value from the rep item. -- Priority rep item, in which case we take the value from the rep item.
if Has_Rep_Item (Ttyp, Name_Priority) then if Has_Rep_Item (Ttyp, Name_Priority) then
Append_To (Args, Append_To (Args,
......
...@@ -2168,20 +2168,23 @@ package body Freeze is ...@@ -2168,20 +2168,23 @@ package body Freeze is
-- Deal with Bit_Order aspect specifying a non-default bit order -- Deal with Bit_Order aspect specifying a non-default bit order
if Reverse_Bit_Order (Rec) and then Base_Type (Rec) = Rec then ADC :=
Get_Attribute_Definition_Clause (Rec, Attribute_Bit_Order);
if Present (ADC) and then Base_Type (Rec) = Rec then
if not Placed_Component then if not Placed_Component then
ADC :=
Get_Attribute_Definition_Clause (Rec, Attribute_Bit_Order);
Error_Msg_N ("?bit order specification has no effect", ADC); Error_Msg_N ("?bit order specification has no effect", ADC);
Error_Msg_N Error_Msg_N
("\?since no component clauses were specified", ADC); ("\?since no component clauses were specified", ADC);
-- Here is where we do the processing for reversed bit order -- Here is where we do the processing for reversed bit order
elsif not Reverse_Storage_Order (Rec) then elsif Reverse_Bit_Order (Rec)
and then not Reverse_Storage_Order (Rec)
then
Adjust_Record_For_Reverse_Bit_Order (Rec); Adjust_Record_For_Reverse_Bit_Order (Rec);
-- Case where we have both a reverse Bit_Order and a corresponding -- Case where we have both an explicit Bit_Order and the same
-- Scalar_Storage_Order: leave record untouched, the back-end -- Scalar_Storage_Order: leave record untouched, the back-end
-- will take care of required layout conversions. -- will take care of required layout conversions.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2011, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -575,7 +575,15 @@ begin ...@@ -575,7 +575,15 @@ begin
-- Initialize tables -- Initialize tables
Arguments.Set_Last (0); Arguments.Set_Last (0);
Arguments.Increment_Last; declare
New_Arguments : Argument_Data;
pragma Warnings (Off, New_Arguments);
-- Declaring this defaulted initialized object ensures
-- that the new allocated component of table Arguments
-- is correctly initialized.
begin
Arguments.Append (New_Arguments);
end;
Patterns.Init (Arguments.Table (1).Directories); Patterns.Init (Arguments.Table (1).Directories);
Patterns.Set_Last (Arguments.Table (1).Directories, 0); Patterns.Set_Last (Arguments.Table (1).Directories, 0);
Patterns.Init (Arguments.Table (1).Name_Patterns); Patterns.Init (Arguments.Table (1).Name_Patterns);
......
...@@ -1026,6 +1026,8 @@ extern void __gnat_notify_unhandled_exception (void); ...@@ -1026,6 +1026,8 @@ extern void __gnat_notify_unhandled_exception (void);
#ifdef __USING_SJLJ_EXCEPTIONS__ #ifdef __USING_SJLJ_EXCEPTIONS__
#define PERSONALITY_FUNCTION __gnat_personality_sj0 #define PERSONALITY_FUNCTION __gnat_personality_sj0
#elif defined(__SEH__)
#define PERSONALITY_FUNCTION __gnat_personality_imp
#else #else
#define PERSONALITY_FUNCTION __gnat_personality_v0 #define PERSONALITY_FUNCTION __gnat_personality_v0
#endif #endif
...@@ -1061,6 +1063,9 @@ typedef int version_arg_t; ...@@ -1061,6 +1063,9 @@ typedef int version_arg_t;
typedef _Unwind_Action phases_arg_t; typedef _Unwind_Action phases_arg_t;
#endif #endif
#ifdef __SEH__
static
#endif
_Unwind_Reason_Code _Unwind_Reason_Code
PERSONALITY_FUNCTION (version_arg_t, phases_arg_t, PERSONALITY_FUNCTION (version_arg_t, phases_arg_t,
_Unwind_Exception_Class, _Unwind_Exception *, _Unwind_Exception_Class, _Unwind_Exception *,
...@@ -1208,6 +1213,16 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e, ...@@ -1208,6 +1213,16 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
#endif /* __USING_SJLJ_EXCEPTIONS__ */ #endif /* __USING_SJLJ_EXCEPTIONS__ */
#ifdef __SEH__
EXCEPTION_DISPOSITION
__gnat_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
PCONTEXT ms_orig_context,
PDISPATCHER_CONTEXT ms_disp)
{
return _GCC_specific_handler (ms_exc, this_frame, ms_orig_context,
ms_disp, __gnat_personality_imp);
}
#endif /* SEH */
#else #else
/* ! IN_RTS */ /* ! IN_RTS */
......
...@@ -464,10 +464,7 @@ package body Sem_Aux is ...@@ -464,10 +464,7 @@ package body Sem_Aux is
or else (Nam = Name_Priority or else (Nam = Name_Priority
and then Chars (N) = Name_Interrupt_Priority)) and then Chars (N) = Name_Interrupt_Priority))
then then
if Check_Parents then if Check_Parents or else Entity (N) = E then
return N;
elsif Entity (N) = E then
return N; return N;
end if; end if;
...@@ -524,10 +521,7 @@ package body Sem_Aux is ...@@ -524,10 +521,7 @@ package body Sem_Aux is
-- This node represents the parent type of type E (if any) -- This node represents the parent type of type E (if any)
begin begin
if No (Par) then if No (Par) or else not Present_In_Rep_Item (Par, N) then
return N;
elsif not Present_In_Rep_Item (Par, N) then
return N; return N;
end if; end if;
end; end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment