aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r--src/nvim/macros.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index d447bff765..61009528a8 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -198,4 +198,25 @@
# define IO_COUNT(x) (x)
#endif
+///
+/// PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES
+///
+#if defined(__clang__) && __clang__ == 1
+# define PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES \
+ _Pragma("clang diagnostic push") \
+ _Pragma("clang diagnostic ignored \"-Wmissing-prototypes\"")
+# define PRAGMA_DIAG_POP \
+ _Pragma("clang diagnostic pop")
+#elif defined(__GNUC__)
+# define PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"")
+# define PRAGMA_DIAG_POP \
+ _Pragma("GCC diagnostic pop")
+#else
+# define PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES
+# define PRAGMA_DIAG_POP
+#endif
+
+
#endif // NVIM_MACROS_H