Skip to content
Snippets Groups Projects
Verified Commit c1045578 authored by Benny Baumann's avatar Benny Baumann
Browse files

add: Allow for temporarily disabling of compiler diagnostics

Workaround for an issue in GCC w.r.t. -Weffc++ on operator= …
parent b9204190
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,15 @@
#define ATTR_LIKELY(x) __builtin_expect((x), 1)
#define ATTR_UNLIKELY(x) __builtin_expect((x), 0)
#define COMPILER_PRAGMA(x) _Pragma(#x)
#define COMPILER_SUPRESS(flag) \
COMPILER_PRAGMA(GCC diagnostic push) \
COMPILER_PRAGMA(GCC diagnostic ignored flag)
#define COMPILER_RESTORE(flag) \
COMPILER_PRAGMA(GCC diagnostic pop) // flag
#else
#define ATTR_NONNULL_ALL
......@@ -30,6 +39,10 @@
#define ATTR_LIKELY(x) (x)
#define ATTR_UNLIKELY(x) (x)
#define COMPILER_PRAGMA(x)
#define COMPILER_SUPRESS(flag)
#define COMPILER_RESTORE(flag)
#endif
#define MARK_UNUSED(x) (void)(x)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment