Author: pschweitzer
Date: Sun May 4 21:01:41 2014
New Revision: 63166
URL:
http://svn.reactos.org/svn/reactos?rev=63166&view=rev
Log:
[PSEH3]
Actually, in previous patch, wrong diagnostic context was being saved (and thus,
restored).
Properly save and restore it now.
The drawback of this is that we have to let it run over finally and except blocks to have
proper builds with -Wdeclaration-after-statement.
Spotted by Thomas.
CORE-8172
Modified:
trunk/reactos/include/reactos/libs/pseh/pseh3.h
Modified: trunk/reactos/include/reactos/libs/pseh/pseh3.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
==============================================================================
--- trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] Sun May 4 21:01:41 2014
@@ -346,8 +346,8 @@
(void)&&_SEH3$_l_BeforeFilterOrFinally; \
(void)&&_SEH3$_l_FilterOrFinally; \
\
+_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
\
-_Pragma("GCC diagnostic push") \
\
/* Count the try level. Outside of any __try, _SEH3$_TryLevel is 0 */ \
enum { \
@@ -379,16 +379,14 @@
_SEH3$_l_BeforeTry: (void)0; \
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
\
+_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
\
-_Pragma("GCC diagnostic push") \
\
/* Forward declaration of the filter function */ \
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \
\
/* Create a static data table that contains the jump target and filter function
*/ \
static const SEH3$_SCOPE_TABLE _SEH3$_ScopeTable = {
&&_SEH3$_l_HandlerTarget, _SEH3$_FILTER(&_SEH3$_FilterFunction,
(__VA_ARGS__)), _SEH3$_TryLevel, _SEH3$_HANDLER_TYPE }; \
-\
-_Pragma("GCC diagnostic pop") \
\
/* Register the registration record. */ \
if (_SEH3$_TryLevel == 1) _SEH3$_RegisterFrame_(&_SEH3$_TrylevelFrame,
&_SEH3$_ScopeTable); \
@@ -397,13 +395,8 @@
/* Define an empty inline finally function */ \
_SEH3$_DEFINE_DUMMY_FINALLY(_SEH3$_FinallyFunction) \
\
-_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
\
-_Pragma("GCC diagnostic push") \
-\
/* Allow intrinsics for __except to be used */ \
_SEH3$_DECLARE_EXCEPT_INTRINSICS(); \
-\
-_Pragma("GCC diagnostic pop") \
\
goto _SEH3$_l_DoTry; \
\
@@ -437,16 +430,14 @@
_SEH3$_l_BeforeTry: (void)0; \
_SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
\
+_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
\
-_Pragma("GCC diagnostic push") \
\
/* Forward declaration of the finally function */ \
_SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \
\
/* Create a static data table that contains the finally function */ \
static const SEH3$_SCOPE_TABLE _SEH3$_ScopeTable = { 0,
_SEH3$_FINALLY(&_SEH3$_FinallyFunction), _SEH3$_TryLevel, _SEH3$_HANDLER_TYPE }; \
-\
-_Pragma("GCC diagnostic pop") \
\
/* Register the registration record. */ \
if (_SEH3$_TryLevel == 1) _SEH3$_RegisterFrame_(&_SEH3$_TrylevelFrame,
&_SEH3$_ScopeTable); \
@@ -479,6 +470,8 @@
/* Implementation of the auto cleanup function */ \
_SEH3$_DEFINE_CLEANUP_FUNC(_SEH3$_AutoCleanup); \
\
+_Pragma("GCC diagnostic pop") \
+\
/* Close the outer scope */ \
} while (0);