[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070309083554.GB1662@ff.dom.local>
Date: Fri, 9 Mar 2007 09:35:54 +0100
From: Jarek Poplawski <jarkao2@...pl>
To: Christoph Hellwig <hch@...radead.org>,
Rusty Russell <rusty@...tcorp.com.au>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Use more gcc extensions in the Linux headers
On 09-03-2007 08:52, Christoph Hellwig wrote:
> On Fri, Mar 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
...
>> +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) \
>> + + sizeof(typeof(int[1 - 2*!!__builtin_types_compatible_p(typeof(arr), \
>> + typeof(&arr[0]))]))*0)
>
> This needs a comment explaning why we're doing this, and maybe a little
> explanation of the combination of gcc magic and C trickery used to implement
> it to the brave non-uberhacker people trying to understand linux headers.
...and to deprive them of all the pleasure of contemplating...
Jarek P.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists