diff options
-rw-r--r-- | include/libxml/xmlversion.h.in | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index 166269e2..db4f01be 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -449,15 +449,21 @@ XMLPUBFUN void xmlCheckVersion(int version); #endif #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) -#define XML_IGNORE_FPTR_CAST_WARNINGS \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ - _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"") -#define XML_POP_WARNINGS \ + #if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 800) + #define XML_IGNORE_FPTR_CAST_WARNINGS \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") \ + _Pragma("GCC diagnostic ignored \"-Wcast-function-type\"") + #else + #define XML_IGNORE_FPTR_CAST_WARNINGS \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + #endif + #define XML_POP_WARNINGS \ _Pragma("GCC diagnostic pop") #else -#define XML_IGNORE_FPTR_CAST_WARNINGS -#define XML_POP_WARNINGS + #define XML_IGNORE_FPTR_CAST_WARNINGS + #define XML_POP_WARNINGS #endif /** DOC_ENABLE */ |