diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-06-14 12:46:14 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-06-14 12:46:14 +0200 |
commit | 758ad97333838b7e5e839100a927b6cadbd030d3 (patch) | |
tree | 8022f62e88e8a45e5256b4ea139d3f253429a975 | |
parent | 34f3a7014b95e058d68adc1bee2e357e38056dec (diff) | |
download | gcc-758ad97333838b7e5e839100a927b6cadbd030d3.zip gcc-758ad97333838b7e5e839100a927b6cadbd030d3.tar.gz gcc-758ad97333838b7e5e839100a927b6cadbd030d3.tar.bz2 |
[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
-rw-r--r-- | gcc/ada/ChangeLog | 23 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 2 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 13 | ||||
-rw-r--r-- | gcc/ada/gnatname.adb | 12 | ||||
-rw-r--r-- | gcc/ada/raise-gcc.c | 15 | ||||
-rw-r--r-- | gcc/ada/sem_aux.adb | 10 |
6 files changed, 59 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4fa5677..3efe1d5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,26 @@ +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> * einfo.adb einfo.ads (Get_Rep_Item): Removed. diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 3f622be..c340baf 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -13668,7 +13668,7 @@ package body Exp_Ch9 is Args := New_List; -- 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 Append_To (Args, diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 6dd00b3c..e58dac5 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2168,20 +2168,23 @@ package body Freeze is -- 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 - ADC := - Get_Attribute_Definition_Clause (Rec, Attribute_Bit_Order); Error_Msg_N ("?bit order specification has no effect", ADC); Error_Msg_N ("\?since no component clauses were specified", ADC); -- 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); - -- 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 -- will take care of required layout conversions. diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb index c741834..68375ef 100644 --- a/gcc/ada/gnatname.adb +++ b/gcc/ada/gnatname.adb @@ -6,7 +6,7 @@ -- -- -- 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 -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -575,7 +575,15 @@ begin -- Initialize tables 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.Set_Last (Arguments.Table (1).Directories, 0); Patterns.Init (Arguments.Table (1).Name_Patterns); diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index b29d3b5..1cfb622 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -1026,6 +1026,8 @@ extern void __gnat_notify_unhandled_exception (void); #ifdef __USING_SJLJ_EXCEPTIONS__ #define PERSONALITY_FUNCTION __gnat_personality_sj0 +#elif defined(__SEH__) +#define PERSONALITY_FUNCTION __gnat_personality_imp #else #define PERSONALITY_FUNCTION __gnat_personality_v0 #endif @@ -1061,6 +1063,9 @@ typedef int version_arg_t; typedef _Unwind_Action phases_arg_t; #endif +#ifdef __SEH__ +static +#endif _Unwind_Reason_Code PERSONALITY_FUNCTION (version_arg_t, phases_arg_t, _Unwind_Exception_Class, _Unwind_Exception *, @@ -1208,6 +1213,16 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e, #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 /* ! IN_RTS */ diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index d08fa45..d729519 100644 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -464,10 +464,7 @@ package body Sem_Aux is or else (Nam = Name_Priority and then Chars (N) = Name_Interrupt_Priority)) then - if Check_Parents then - return N; - - elsif Entity (N) = E then + if Check_Parents or else Entity (N) = E then return N; end if; @@ -524,10 +521,7 @@ package body Sem_Aux is -- This node represents the parent type of type E (if any) begin - if No (Par) then - return N; - - elsif not Present_In_Rep_Item (Par, N) then + if No (Par) or else not Present_In_Rep_Item (Par, N) then return N; end if; end; |