diff options
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 4a49b75..229f593 100644 --- a/src/config.h +++ b/src/config.h @@ -198,4 +198,19 @@ # define BFS_TARGET_CLONES true #endif +/** + * Ignore a particular GCC warning for a region of code. + */ +#if __GNUC__ +# define BFS_PRAGMA_STRINGIFY(...) _Pragma(#__VA_ARGS__) +# define BFS_SUPPRESS(warning) \ + _Pragma("GCC diagnostic push"); \ + BFS_PRAGMA_STRINGIFY(GCC diagnostic ignored warning) +# define BFS_UNSUPPRESS() \ + _Pragma("GCC diagnostic pop") +#else +# define BFS_SUPPRESS(warning) +# define BFS_UNSUPPRESS() +#endif + #endif // BFS_CONFIG_H |