Quotes of the week
[Posted March 14, 2007 by corbet]
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) \
+ + sizeof(typeof(int[1 - 2*!!__builtin_types_compatible_p(typeof(arr), \
+ typeof(&arr[0]))]))*0)
-- Rusty Russell
Rusty, that's a work of art.
However, I would suggest that you never show it to anybody ever
again. I'm sure that in fifty years, it will be worth much more. So
please keep it tightly under wraps, to keep people from gouging
their eyes out^W^W^W^W^W^W^W make a killing in the art market.
-- Linus Torvalds
(
Log in to post comments)