@@ -545,14 +545,14 @@ typedef struct
545
545
/* The three constants below are specific ttype identifiers for special
546
546
exception ids. Their type should match what a-exexpr exports. */
547
547
548
- extern const char __gnat_others_value ;
549
- #define GNAT_OTHERS ((_Unwind_Ptr ) &__gnat_others_value)
548
+ extern char __gnat_others_value ;
549
+ #define GNAT_OTHERS ((Exception_Id ) &__gnat_others_value)
550
550
551
- extern const char __gnat_all_others_value ;
552
- #define GNAT_ALL_OTHERS ((_Unwind_Ptr ) &__gnat_all_others_value)
551
+ extern char __gnat_all_others_value ;
552
+ #define GNAT_ALL_OTHERS ((Exception_Id ) &__gnat_all_others_value)
553
553
554
- extern const char __gnat_unhandled_others_value ;
555
- #define GNAT_UNHANDLED_OTHERS ((_Unwind_Ptr ) &__gnat_unhandled_others_value)
554
+ extern char __gnat_unhandled_others_value ;
555
+ #define GNAT_UNHANDLED_OTHERS ((Exception_Id ) &__gnat_unhandled_others_value)
556
556
557
557
/* Describe the useful region data associated with an unwind context. */
558
558
@@ -902,12 +902,10 @@ get_call_site_action_for (_Unwind_Ptr ip,
902
902
#define Foreign_Data_For __gnat_foreign_data_for
903
903
#define EID_For __gnat_eid_for
904
904
905
- extern bool Is_Handled_By_Others (_Unwind_Ptr eid );
906
- extern char Language_For (_Unwind_Ptr eid );
907
-
908
- extern void * Foreign_Data_For (_Unwind_Ptr eid );
909
-
910
- extern Exception_Id EID_For (_GNAT_Exception * e );
905
+ extern bool Is_Handled_By_Others (Exception_Id eid );
906
+ extern char Language_For (Exception_Id eid );
907
+ extern void * Foreign_Data_For (Exception_Id eid );
908
+ extern Exception_Id EID_For (_GNAT_Exception * e );
911
909
912
910
#define Foreign_Exception system__exceptions__foreign_exception
913
911
extern struct Exception_Data Foreign_Exception ;
@@ -928,7 +926,7 @@ exception_class_eq (const _GNAT_Exception *except,
928
926
/* Return how CHOICE matches PROPAGATED_EXCEPTION. */
929
927
930
928
static enum action_kind
931
- is_handled_by (_Unwind_Ptr choice , _GNAT_Exception * propagated_exception )
929
+ is_handled_by (Exception_Id choice , _GNAT_Exception * propagated_exception )
932
930
{
933
931
/* All others choice match everything. */
934
932
if (choice == GNAT_ALL_OTHERS )
@@ -937,14 +935,10 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception)
937
935
/* GNAT exception occurrence. */
938
936
if (exception_class_eq (propagated_exception , GNAT_EXCEPTION_CLASS ))
939
937
{
940
- /* Pointer to the GNAT exception data corresponding to the propagated
941
- occurrence. */
942
- _Unwind_Ptr E = (_Unwind_Ptr ) EID_For (propagated_exception );
943
-
944
938
if (choice == GNAT_UNHANDLED_OTHERS )
945
939
return unhandler ;
946
940
947
- E = ( _Unwind_Ptr ) EID_For (propagated_exception );
941
+ Exception_Id E = EID_For (propagated_exception );
948
942
949
943
/* Base matching rules: An exception data (id) matches itself, "when
950
944
all_others" matches anything and "when others" matches anything
@@ -960,7 +954,7 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception)
960
954
if (choice == GNAT_ALL_OTHERS
961
955
|| choice == GNAT_OTHERS
962
956
#ifndef CERT
963
- || choice == ( _Unwind_Ptr ) & Foreign_Exception
957
+ || choice == & Foreign_Exception
964
958
#endif
965
959
)
966
960
return handler ;
@@ -1057,25 +1051,25 @@ get_action_description_for (_Unwind_Ptr ip,
1057
1051
/* Positive filters are for regular handlers. */
1058
1052
else if (ar_filter > 0 )
1059
1053
{
1060
- /* Do not catch an exception if the _UA_FORCE_UNWIND flag is
1061
- passed (to follow the ABI). */
1062
- if (!(uw_phase & _UA_FORCE_UNWIND ))
1063
- {
1054
+ /* Do not catch an exception if the _UA_FORCE_UNWIND flag is
1055
+ passed (to follow the ABI). */
1056
+ if (!(uw_phase & _UA_FORCE_UNWIND ))
1057
+ {
1064
1058
enum action_kind act ;
1065
1059
1066
- /* See if the filter we have is for an exception which
1067
- matches the one we are propagating. */
1068
- _Unwind_Ptr choice =
1069
- get_ttype_entry_for (region , ar_filter );
1060
+ /* See if the filter we have is for an exception which
1061
+ matches the one we are propagating. */
1062
+ Exception_Id choice
1063
+ = ( Exception_Id ) get_ttype_entry_for (region , ar_filter );
1070
1064
1071
1065
act = is_handled_by (choice , gnat_exception );
1072
- if (act != nothing )
1073
- {
1066
+ if (act != nothing )
1067
+ {
1074
1068
action -> kind = act ;
1075
- action -> ttype_filter = ar_filter ;
1076
- return ;
1077
- }
1078
- }
1069
+ action -> ttype_filter = ar_filter ;
1070
+ return ;
1071
+ }
1072
+ }
1079
1073
}
1080
1074
1081
1075
/* Negative filter values are for C++ exception specifications.
0 commit comments