diff --git a/reactos/sdk/include/reactos/libs/pseh/pseh3.h b/reactos/sdk/include/reactos/libs/pseh/pseh3.h index 7473a8c0f57..6f9732ed728 100644 --- a/reactos/sdk/include/reactos/libs/pseh/pseh3.h +++ b/reactos/sdk/include/reactos/libs/pseh/pseh3.h @@ -16,6 +16,12 @@ extern "C" { #endif +#ifdef __cplusplus +#define PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT +#else +#define PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") +#endif + /* CLANG must safe non-volatiles, because it uses a return-twice algorithm */ #if defined(__clang__) && !defined(_SEH3$_FRAME_ALL_NONVOLATILES) #define _SEH3$_FRAME_ALL_NONVOLATILES 1 @@ -354,7 +360,7 @@ _Pragma("GCC diagnostic pop") \ (void)&&_SEH3$_l_FilterOrFinally; \ \ _Pragma("GCC diagnostic push") \ -_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \ +PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \ \ /* Count the try level. Outside of any __try, _SEH3$_TryLevel is 0 */ \ enum { \ @@ -386,7 +392,7 @@ _Pragma("GCC diagnostic pop") \ _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \ \ _Pragma("GCC diagnostic push") \ -_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \ +PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \ \ /* Forward declaration of the filter function */ \ _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FilterFunction); \ @@ -436,7 +442,7 @@ _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \ _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \ \ _Pragma("GCC diagnostic push") \ -_Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \ +PRAGMA_DIAGNOSTIC_IGNORED_DECLARATION_AFTER_STATEMENT \ \ /* Forward declaration of the finally function */ \ _SEH3$_DECLARE_FILTER_FUNC(_SEH3$_FinallyFunction); \