News for hackers. Stuff that matters.
Re:What is “:-!!” in C code? by thomasahle on Monday November 21, 2016 @05:56AM (#13004489)

    -#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
    +#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
    +#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
The commit that introduced the notation, actually used something similar to your second approach: https://github.com/torvalds/linux/commit/8c87df457cb58fe75b9...

There are no comments on this comment yet.