Fix: powerpc32: transparent unions alter calling convention
[userspace-rcu.git] / include / urcu / lfstack.h
index b994ea6b5385285d7357da5c0a3fb2fc74eea257..0f4ee99d8c92a88d88d51fe47d36eb47275056fb 100644 (file)
@@ -29,7 +29,6 @@ extern "C" {
 
 #include <stdbool.h>
 #include <pthread.h>
-#include <urcu/compiler.h>
 
 /*
  * Lock-free stack.
@@ -87,11 +86,21 @@ struct cds_lfs_stack {
  *
  * In C++, implement static inline wrappers using function overloading
  * to obtain an API similar to C.
+ *
+ * Avoid complaints from clang++ not knowing the transparent union
+ * attribute.
  */
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wignored-attributes"
+#endif
 typedef union {
        struct __cds_lfs_stack *_s;
        struct cds_lfs_stack *s;
-} caa_c_transparent_union cds_lfs_stack_ptr_t;
+} __attribute__((__transparent_union__)) cds_lfs_stack_ptr_t;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
 
 #ifdef _LGPL_SOURCE
 
This page took 0.022967 seconds and 4 git commands to generate.