On Fri, Jan 10, 2020 at 8:56 AM Will Deacon [off-list ref] wrote:
+/* Declare an unqualified scalar type. Leaves non-scalar types unchanged. */
+#define __unqual_scalar_typeof(x) typeof( \
Ugh. My eyes. That's horrendous.
I can't see any better alternatives, but it does make me go "Eww".
Well, I do see one possible alternative: just re-write the bitop
implementations in terms of "atomic_long_t", and just avoid the issue
entirely.
IOW, do something like the attached (but fleshed out and tested - this
patch has not seen a compiler, much less any thought at all).
Linus