mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[PSEH] Make the dummy PSEH at least usable.
Not screwing the code flow when no exception happens would be the least
This commit is contained in:
parent
617c7cc377
commit
96a2b18903
1 changed files with 26 additions and 5 deletions
|
@ -42,15 +42,36 @@
|
|||
extern int _SEH2_Volatile0;
|
||||
extern int _SEH2_VolatileExceptionCode;
|
||||
|
||||
#define _SEH2_TRY {
|
||||
#define _SEH2_FINALLY } {
|
||||
#define _SEH2_EXCEPT(...) } if (_SEH2_Volatile0 || (0 && (__VA_ARGS__))) {
|
||||
#define _SEH2_END }
|
||||
#define _SEH2_TRY \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wunused-label\"")\
|
||||
{ \
|
||||
__label__ __seh2_scope_end__;
|
||||
|
||||
#define _SEH2_FINALLY \
|
||||
__seh2_scope_end__:; \
|
||||
} \
|
||||
if (1) \
|
||||
{ \
|
||||
__label__ __seh2_scope_end__;
|
||||
|
||||
#define _SEH2_EXCEPT(...) \
|
||||
__seh2_scope_end__:; \
|
||||
} \
|
||||
if (_SEH2_Volatile0 || (0 && (__VA_ARGS__))) \
|
||||
{ \
|
||||
__label__ __seh2_scope_end__;
|
||||
|
||||
#define _SEH2_END \
|
||||
__seh2_scope_end__:; \
|
||||
} \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
#define _SEH2_GetExceptionInformation() ((struct _EXCEPTION_POINTERS*)0)
|
||||
#define _SEH2_GetExceptionCode() _SEH2_VolatileExceptionCode
|
||||
#define _SEH2_AbnormalTermination() (0)
|
||||
#define _SEH2_YIELD(STMT_) STMT_
|
||||
#define _SEH2_LEAVE
|
||||
#define _SEH2_LEAVE goto __seh2_scope_end__;
|
||||
#define _SEH2_VOLATILE volatile
|
||||
|
||||
#elif defined(_USE_PSEH3)
|
||||
|
|
Loading…
Reference in a new issue