From: Joe Perches <joe@perches.com> Date: 2012-07-01 17:31:13
On Sun, 2012-07-01 at 09:38 -0700, Joe Perches wrote:
I think this macro is suboptimal because
negated names are easy to misuse.
I think type is also unnecessary and too
easy to mismatch or keep up to date with
field type changes.
Perhaps it's better as:
#define all_zeros_or_all_ones(field) \
({ \
field && (typeof(field))~field; \
})
Umm, or not.
It helps when I actually test the code not just type
it into an email client.
!(field && (typeof(field))~field)