diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 12:52:57 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 12:52:57 +0000 |
commit | 8ef30a2395b23109b53f82de6f09143289aecce1 (patch) | |
tree | ac649f73e38def9883197d6f34e3b6007624c553 /gcc/ada/a-except.adb | |
parent | 65a805b200de577b88fde2afcbb07a3ce7540268 (diff) | |
download | gcc-8ef30a2395b23109b53f82de6f09143289aecce1.tar.gz |
2011-08-29 Tristan Gingold <gingold@adacore.com>
* a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
* a-exexda.adb (Set_Exception_C_Msg): Ditto.
(Set_Exception_Msg): Ditto.
* a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
Private_Data.
* a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
Use Save_Occurrence instead of Save_Occurrence_No_Private.
(Raise_With_Msg): Remove Cleanup_Flag.
* a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
Clean_Flag and Private_Data components.
2011-08-29 Yannick Moy <moy@adacore.com>
* freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
in CodePeer mode.
* sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
of an explicitly declared type, so that the base types of the original
type and this generated type are the same, and a "type" (not a subtype
like previously).
* errout.adb (Special_Msg_Delete): Do not issue messages "Size too
small" in Alfa mode, like in CodePeer mode.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
clauses in Alfa mode.
2011-08-29 Javier Miranda <miranda@adacore.com>
* exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
function to the package spec.
* sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
internally generated bodies of null procedures locate the internally
generated spec enforcing mode conformance.
(Is_Interface_Conformant): Ensure that the controlling formal of the
primitives match.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
reject the pragma if it appears to apply to a formal subprogram.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
inner expression, to prevent double evaluation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except.adb')
-rw-r--r-- | gcc/ada/a-except.adb | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb index 44ccc9a58f7..4d5d181786f 100644 --- a/gcc/ada/a-except.adb +++ b/gcc/ada/a-except.adb @@ -341,18 +341,6 @@ package body Ada.Exceptions is -- (all fields of this exception occurrence are set). Abort is deferred -- before the reraise operation. - -- Save_Occurrence variations: As the management of the private data - -- attached to occurrences is delicate, whether or not pointers to such - -- data has to be copied in various situations is better made explicit. - -- The following procedures provide an internal interface to help making - -- this explicit. - - procedure Save_Occurrence_No_Private - (Target : out Exception_Occurrence; - Source : Exception_Occurrence); - -- Copy all the components of Source to Target, except the - -- Private_Data pointer. - procedure Transfer_Occurrence (Target : Exception_Occurrence_Access; Source : Exception_Occurrence); @@ -959,7 +947,6 @@ package body Ada.Exceptions is Excep.Exception_Raised := False; Excep.Id := E; Excep.Num_Tracebacks := 0; - Excep.Cleanup_Flag := False; Excep.Pid := Local_Partition_ID; Abort_Defer.all; Raise_Current_Excep (E); @@ -1164,7 +1151,7 @@ package body Ada.Exceptions is begin if X.Id /= null then Abort_Defer.all; - Save_Occurrence_No_Private (Get_Current_Excep.all.all, X); + Save_Occurrence (Get_Current_Excep.all.all, X); Raise_Current_Excep (X.Id); end if; end Reraise_Occurrence; @@ -1176,7 +1163,7 @@ package body Ada.Exceptions is procedure Reraise_Occurrence_Always (X : Exception_Occurrence) is begin Abort_Defer.all; - Save_Occurrence_No_Private (Get_Current_Excep.all.all, X); + Save_Occurrence (Get_Current_Excep.all.all, X); Raise_Current_Excep (X.Id); end Reraise_Occurrence_Always; @@ -1186,7 +1173,7 @@ package body Ada.Exceptions is procedure Reraise_Occurrence_No_Defer (X : Exception_Occurrence) is begin - Save_Occurrence_No_Private (Get_Current_Excep.all.all, X); + Save_Occurrence (Get_Current_Excep.all.all, X); Raise_Current_Excep (X.Id); end Reraise_Occurrence_No_Defer; @@ -1199,37 +1186,24 @@ package body Ada.Exceptions is Source : Exception_Occurrence) is begin - Save_Occurrence_No_Private (Target, Source); - end Save_Occurrence; - - function Save_Occurrence (Source : Exception_Occurrence) return EOA is - Target : constant EOA := new Exception_Occurrence; - begin - Save_Occurrence (Target.all, Source); - return Target; - end Save_Occurrence; - - -------------------------------- - -- Save_Occurrence_No_Private -- - -------------------------------- - - procedure Save_Occurrence_No_Private - (Target : out Exception_Occurrence; - Source : Exception_Occurrence) - is - begin Target.Id := Source.Id; Target.Msg_Length := Source.Msg_Length; Target.Num_Tracebacks := Source.Num_Tracebacks; Target.Pid := Source.Pid; - Target.Cleanup_Flag := Source.Cleanup_Flag; Target.Msg (1 .. Target.Msg_Length) := Source.Msg (1 .. Target.Msg_Length); Target.Tracebacks (1 .. Target.Num_Tracebacks) := Source.Tracebacks (1 .. Target.Num_Tracebacks); - end Save_Occurrence_No_Private; + end Save_Occurrence; + + function Save_Occurrence (Source : Exception_Occurrence) return EOA is + Target : constant EOA := new Exception_Occurrence; + begin + Save_Occurrence (Target.all, Source); + return Target; + end Save_Occurrence; ------------------------- -- Transfer_Occurrence -- @@ -1240,13 +1214,7 @@ package body Ada.Exceptions is Source : Exception_Occurrence) is begin - -- Setup Target as an exception to be propagated in the calling task - -- (rendezvous-wise), taking care not to clobber the associated private - -- data. Target is expected to be a pointer to the calling task's fixed - -- TSD occurrence, which is very different from Get_Current_Excep here - -- because this subprogram is called from the called task. - - Save_Occurrence_No_Private (Target.all, Source); + Save_Occurrence (Target.all, Source); end Transfer_Occurrence; ------------------- |