Re: [PATCH] Use more gcc extensions in the Linux headers
From: Valdis . Kletnieks
Date: Fri Mar 09 2007 - 23:12:30 EST
On Sat, 10 Mar 2007 09:57:32 +1100, Rusty Russell said:
> +/* GCC is awesome. */
> #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) \
> + sizeof(typeof(int[1 - 2*!!__builtin_types_compatible_p(typeof(arr), \
> typeof(&arr[0]))]))*0)
-/* GCC is awesome. */
+/* GCC leaves me speechless. */
Attachment:
pgp00000.pgp
Description: PGP signature