Add helper macros for suppressing gcc 8 -Wcast-function-type
These warnings are unavoidable in a few places, and testing for gcc version and suppressing them is too verbose, so define helper macros making it a bit less painful.
This commit is contained in:
@@ -667,6 +667,17 @@ typedef short int WXTYPE;
|
||||
# define wxGCC_WARNING_RESTORE(x)
|
||||
#endif
|
||||
|
||||
/* Specific macros for -Wcast-function-type warning new in gcc 8. */
|
||||
#if wxCHECK_GCC_VERSION(8, 0)
|
||||
#define wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE() \
|
||||
wxGCC_WARNING_SUPPRESS(cast-function-type)
|
||||
#define wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE() \
|
||||
wxGCC_WARNING_RESTORE(cast-function-type)
|
||||
#else
|
||||
#define wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
|
||||
#define wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
|
||||
#endif
|
||||
|
||||
/*
|
||||
Macros to suppress and restore clang warning only when it is valid.
|
||||
|
||||
|
Reference in New Issue
Block a user