diff options
Diffstat (limited to 'include/diagnostics.h')
-rw-r--r-- | include/diagnostics.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/diagnostics.h b/include/diagnostics.h index d3ff27b..41e6db6 100644 --- a/include/diagnostics.h +++ b/include/diagnostics.h @@ -76,6 +76,11 @@ # define DIAGNOSTIC_ERROR_SWITCH \ DIAGNOSTIC_ERROR ("-Wswitch") +# if __has_warning ("-Wenum-constexpr-conversion") +# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \ + DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion") +# endif + #elif defined (__GNUC__) /* GCC */ # define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \ @@ -155,4 +160,8 @@ # define DIAGNOSTIC_ERROR_SWITCH #endif +#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION +# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION +#endif + #endif /* DIAGNOSTICS_H */ |