X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/9b1663a5574182a66c6de8ad2fce7b3e4cbf277b..23bbea75793621e6b21fbb13c00d8223113cf7b5:/key/key-data.h diff --git a/key/key-data.h b/key/key-data.h index cfeff82..8071116 100644 --- a/key/key-data.h +++ b/key/key-data.h @@ -38,6 +38,7 @@ #include #include +#include #include #ifndef CATACOMB_KEY_ERROR_H @@ -160,26 +161,10 @@ typedef struct key_filter { unsigned m; } key_filter; -/* --- Matching aginst key selection --- * - * - * GCC will warn about constant addresses in this test, which is rather - * unfortunate. Muffle the warning. This is rather hideous because of the - * way GCC's parser handles pragmata. - */ - -#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) -# define KEY_MATCH_MUFFLE_WARNING(x) __extension__ ({ \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Waddress\"") \ - (x); \ - _Pragma("GCC diagnostic pop") \ - }) -#else -# define KEY_MATCH_MUFFLE_WARNING(x) (x) -#endif +/* --- Matching aginst key selection --- */ #define KEY_MATCH(kd, kf) \ - (KEY_MATCH_MUFFLE_WARNING(!(kf)) || \ + (MUFFLE_WARNINGS_EXPR(GCC_WARNING("-Waddress"), !(kf)) || \ ((kd)->e & KF_ENCMASK) == KENC_STRUCT || \ ((kd)->e & (kf)->m) == (kf)->f)