X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=include%2Furcu%2Fwfstack.h;fp=include%2Furcu%2Fwfstack.h;h=0890f5c1a54b7d8e590196cf6553ce12f5b7e001;hp=5d58a9143ffb49eaaf6f2a1ad491aa34a81048d3;hb=087bce43020d2b45dab2dd8ecd6b0d6949c626f3;hpb=e915ab84fd0c02d37504f3eb1e1f3be93ea6dc37 diff --git a/include/urcu/wfstack.h b/include/urcu/wfstack.h index 5d58a91..0890f5c 100644 --- a/include/urcu/wfstack.h +++ b/include/urcu/wfstack.h @@ -98,11 +98,21 @@ struct cds_wfs_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_wfs_stack *_s; struct cds_wfs_stack *s; -} caa_c_transparent_union cds_wfs_stack_ptr_t; +} __attribute__((__transparent_union__)) cds_wfs_stack_ptr_t; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #ifdef _LGPL_SOURCE