+/*
+ * Horrible macros to enable use of code that was meant to be C-specific
+ * (and which push struct onto type) in C++; without these, C++ code
+ * that uses these macros in the context of a class will blow up
+ * due to "struct" being preprended to "type" by the macros, causing
+ * inconsistent use of tags.
+ *
+ * This approach is necessary because these are macros; we have to use
+ * these on a per-macro basis (because the queues are implemented as
+ * macros, disabling this warning in the scope of the header file is
+ * insufficient), whuch means we can't use #pragma, and have to use
+ * _Pragma. We only need to use these for the queue macros that
+ * prepend "struct" to "type" and will cause C++ to blow up.
+ */
+#if defined(__clang__) && defined(__cplusplus)
+#define __MISMATCH_TAGS_PUSH \
+ _Pragma("clang diagnostic push") \
+ _Pragma("clang diagnostic ignored \"-Wmismatched-tags\"")
+#define __MISMATCH_TAGS_POP \
+ _Pragma("clang diagnostic pop")
+#else
+#define __MISMATCH_TAGS_PUSH
+#define __MISMATCH_TAGS_POP
+#endif
+