Re: [PATCH] Use more gcc extensions in the Linux headers

From: Nigel Cunningham
Date: Sat Mar 10 2007 - 00:20:01 EST


Hi.

On Fri, 2007-03-09 at 23:03 -0500, Valdis.Kletnieks@xxxxxx wrote:
> 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. */

A speechless Rusty would be horrible. That said, it would be nice if the
comment was something more like the normal Rusty pearl of wisdom. I
understand the first part, but have no idea was + sizeof(typeof(int[....
does...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/