X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=include%2Furcu%2Flfstack.h;h=0f4ee99d8c92a88d88d51fe47d36eb47275056fb;hp=b994ea6b5385285d7357da5c0a3fb2fc74eea257;hb=087bce43020d2b45dab2dd8ecd6b0d6949c626f3;hpb=e915ab84fd0c02d37504f3eb1e1f3be93ea6dc37 diff --git a/include/urcu/lfstack.h b/include/urcu/lfstack.h index b994ea6..0f4ee99 100644 --- a/include/urcu/lfstack.h +++ b/include/urcu/lfstack.h @@ -29,7 +29,6 @@ extern "C" { #include #include -#include /* * 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