- Avoid trying to disable 'declaration after statement' warnings in C++
CORE-11794

svn path=/trunk/; revision=73211
This commit is contained in:
Thomas Faber 2016-11-12 14:52:58 +00:00
parent 790c388fd1
commit 67cbaa5a02

View file

@ -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); \