On Sun, 11 Mar 2007 13:50:37 +1100, Rusty Russell said:
> Well, this is what I sent to Linus and Andrew (many thanks to those who
> made appropriately whimsical *or* useful comments):
Ahh.. much better - it's now a form that even I can get my brain wrapped around
:)
pgpkbTo4rWBle.pgp
On Fri, 09 Mar 2007 20:24:42 PST, Randy Dunlap said:
> On Fri, 09 Mar 2007 23:03:05 -0500 [EMAIL PROTECTED] wrote:
> > -/* GCC is awesome. */
> > +/* GCC leaves me speechless. */
>
> "awesome" can mean "inspiring awe or admiration or wonder" (amazing)
> or it can mean "awful" (as in terrifying).
On Fri, 09 Mar 2007 20:24:42 PST, Randy Dunlap said:
On Fri, 09 Mar 2007 23:03:05 -0500 [EMAIL PROTECTED] wrote:
-/* GCC is awesome. */
+/* GCC leaves me speechless. */
awesome can mean inspiring awe or admiration or wonder (amazing)
or it can mean awful (as in terrifying). 8)
And as
On Sun, 11 Mar 2007 13:50:37 +1100, Rusty Russell said:
Well, this is what I sent to Linus and Andrew (many thanks to those who
made appropriately whimsical *or* useful comments):
Ahh.. much better - it's now a form that even I can get my brain wrapped around
:)
pgpkbTo4rWBle.pgp
On Sun, 2007-03-11 at 03:58 +0100, Jan Engelhardt wrote:
> >-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
> >+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) +
> >__must_be_array(arr))
> >+
> 80 cols *cough* :)
I think your cough added a column?
Rusty.
-
To unsubscribe from this
On Mar 11 2007 13:50, Rusty Russell wrote:
>On Sat, 2007-03-10 at 02:04 +0100, Jan Engelhardt wrote:
>> Getting back at the macro, how would you like to have it merged?
>
>Well, this is what I sent to Linus and Andrew (many thanks to those who
>made appropriately whimsical *or* useful comments):
On Sat, 2007-03-10 at 02:04 +0100, Jan Engelhardt wrote:
> Getting back at the macro, how would you like to have it merged?
Well, this is what I sent to Linus and Andrew (many thanks to those who
made appropriately whimsical *or* useful comments):
diff -r 1ccdf46b0f41
On Fri, 9 Mar 2007, Linus Torvalds wrote:
> On Fri, 9 Mar 2007, Christoph Hellwig wrote:
> Well, since Rusty's macro was hoddible *anyway*, I don't think I'd apply
> it as-is. Breaking icc for something that ugly and not-very-important
> simply makes no sense.
>
> There are better ways to do this.
On Mar 10 2007 16:18, Andreas Schwab wrote:
>Jan Engelhardt <[EMAIL PROTECTED]> writes:
>
>> So in case they _ARE_ compatible, we get the compile error, as far as I
>> can see it. There's a ! too much in the !!_builtin line.
>
>The error case is when the types are compatible. That means
Jan Engelhardt <[EMAIL PROTECTED]> writes:
> So in case they _ARE_ compatible, we get the compile error, as far as I
> can see it. There's a ! too much in the !!_builtin line.
The error case is when the types are compatible. That means that the
argument is in fact _not_ an array.
Andreas.
--
On Mar 10 2007 16:19, Nigel Cunningham wrote:
>On Fri, 2007-03-09 at 23:03 -0500, [EMAIL PROTECTED] 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])
>> > \
>> >
On Mar 10 2007 16:19, Nigel Cunningham wrote:
On Fri, 2007-03-09 at 23:03 -0500, [EMAIL PROTECTED] 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])
\
+
Jan Engelhardt [EMAIL PROTECTED] writes:
So in case they _ARE_ compatible, we get the compile error, as far as I
can see it. There's a ! too much in the !!_builtin line.
The error case is when the types are compatible. That means that the
argument is in fact _not_ an array.
Andreas.
--
On Mar 10 2007 16:18, Andreas Schwab wrote:
Jan Engelhardt [EMAIL PROTECTED] writes:
So in case they _ARE_ compatible, we get the compile error, as far as I
can see it. There's a ! too much in the !!_builtin line.
The error case is when the types are compatible. That means that
On Fri, 9 Mar 2007, Linus Torvalds wrote:
On Fri, 9 Mar 2007, Christoph Hellwig wrote:
Well, since Rusty's macro was hoddible *anyway*, I don't think I'd apply
it as-is. Breaking icc for something that ugly and not-very-important
simply makes no sense.
There are better ways to do this.
For
On Sat, 2007-03-10 at 02:04 +0100, Jan Engelhardt wrote:
Getting back at the macro, how would you like to have it merged?
Well, this is what I sent to Linus and Andrew (many thanks to those who
made appropriately whimsical *or* useful comments):
diff -r 1ccdf46b0f41 include/linux/compiler-gcc.h
On Mar 11 2007 13:50, Rusty Russell wrote:
On Sat, 2007-03-10 at 02:04 +0100, Jan Engelhardt wrote:
Getting back at the macro, how would you like to have it merged?
Well, this is what I sent to Linus and Andrew (many thanks to those who
made appropriately whimsical *or* useful comments):
diff
On Sun, 2007-03-11 at 03:58 +0100, Jan Engelhardt wrote:
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) +
__must_be_array(arr))
+
80 cols *cough* :)
I think your cough added a column?
Rusty.
-
To unsubscribe from this list:
Hi.
On Fri, 2007-03-09 at 23:03 -0500, [EMAIL PROTECTED] 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 -
On Fri, 09 Mar 2007 23:03:05 -0500 [EMAIL PROTECTED] 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 -
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([0]))]))*0)
-/* GCC
On Mar 10 2007 09:57, Rusty Russell wrote:
>On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
>> __builtin_types_compatible_p() has been around since gcc 2.95, and we
>> don't use it anywhere. This patch quietly fixes that.
>
>OK, many people complained that it needed a comment. Good
On Sat, 10 Mar 2007, Rusty Russell wrote:
> On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
> > __builtin_types_compatible_p() has been around since gcc 2.95, and we
> > don't use it anywhere. This patch quietly fixes that.
>
> OK, many people complained that it needed a comment. Good
Perhaps this patch can go into Wesnoth for testing for a while before
we merge it into the kernel?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
On Sat, 10 Mar 2007 09:57:32 +1100 Rusty Russell wrote:
> On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
> > __builtin_types_compatible_p() has been around since gcc 2.95, and we
> > don't use it anywhere. This patch quietly fixes that.
Bah. Just because gcc has a "feature" doesn't
On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
OK, many people complained that it needed a comment. Good point!
==
Add comment to ARRAY_SIZE macro.
On Fri, 9 Mar 2007, Christoph Hellwig wrote:
>
> It was only put in under the premise that they'll fix whatever breaks,
> we're not going to put any maintaince border on us to hack around
> broken propritary compilers.
Well, since Rusty's macro was hoddible *anyway*, I don't think I'd apply
Rusty Russell <[EMAIL PROTECTED]> writes:
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
Using BUILD_BUG_ON_ZERO() would have been somewhat cleaner.
-Andi
-
To unsubscribe from this list: send the line
On Fri, Mar 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
>
> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Is your clock set correctly? Looks like this mail
On Fri, Mar 09, 2007 at 12:02:19PM +0300, Andrey Panin wrote:
> Kernel compilation with Intel compiler is (was ?) supported.
> This patch will break it.
It was only put in under the premise that they'll fix whatever breaks,
we're not going to put any maintaince border on us to hack around
broken
On 068, 03 09, 2007 at 07:53:08AM +, Christoph Hellwig wrote:
> On Fri, Mar 09, 2007 at 09:50:56AM +0300, Andrey Panin wrote:
> > On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
> > > __builtin_types_compatible_p() has been around since gcc 2.95,
> >
> > but it's not available
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), \
>> +
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), \
+
On 068, 03 09, 2007 at 07:53:08AM +, Christoph Hellwig wrote:
On Fri, Mar 09, 2007 at 09:50:56AM +0300, Andrey Panin wrote:
On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95,
but it's not available in Intel C
On Fri, Mar 09, 2007 at 12:02:19PM +0300, Andrey Panin wrote:
Kernel compilation with Intel compiler is (was ?) supported.
This patch will break it.
It was only put in under the premise that they'll fix whatever breaks,
we're not going to put any maintaince border on us to hack around
broken
On Fri, Mar 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
Is your clock set correctly? Looks like this mail was
Rusty Russell [EMAIL PROTECTED] writes:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Using BUILD_BUG_ON_ZERO() would have been somewhat cleaner.
-Andi
-
To unsubscribe from this list: send the line unsubscribe
On Fri, 9 Mar 2007, Christoph Hellwig wrote:
It was only put in under the premise that they'll fix whatever breaks,
we're not going to put any maintaince border on us to hack around
broken propritary compilers.
Well, since Rusty's macro was hoddible *anyway*, I don't think I'd apply
it
On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
OK, many people complained that it needed a comment. Good point!
==
Add comment to ARRAY_SIZE macro.
On Sat, 10 Mar 2007 09:57:32 +1100 Rusty Russell wrote:
On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Bah. Just because gcc has a feature doesn't mean we
Perhaps this patch can go into Wesnoth for testing for a while before
we merge it into the kernel?
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
On Sat, 10 Mar 2007, Rusty Russell wrote:
On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
OK, many people complained that it needed a comment. Good point!
On Mar 10 2007 09:57, Rusty Russell wrote:
On Fri, 2007-03-09 at 16:56 +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
OK, many people complained that it needed a comment. Good point!
==
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
On Fri, 09 Mar 2007 23:03:05 -0500 [EMAIL PROTECTED] 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 -
Hi.
On Fri, 2007-03-09 at 23:03 -0500, [EMAIL PROTECTED] 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 -
On Fri, Mar 09, 2007 at 09:50:56AM +0300, Andrey Panin wrote:
> On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
> > __builtin_types_compatible_p() has been around since gcc 2.95,
>
> but it's not available in Intel C compiler IIRC :(
So what?
-
To unsubscribe from this list: send
On Fri, Mar 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
>
> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
>
> diff -r f0ff8138f993 include/linux/kernel.h
>
On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
> __builtin_types_compatible_p() has been around since gcc 2.95,
but it's not available in Intel C compiler IIRC :(
> and we don't use it anywhere. This patch quietly fixes that.
>
> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
>
On Fri, 9 Mar 2007, Rusty Russell wrote:
>
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
Whee.
Rusty, that's a work of art.
However, I would suggest that you never show it to anybody ever again. I'm
sure that
On Fri, 09 Mar 2007 16:56:32 +1100 Rusty Russell <[EMAIL PROTECTED]> wrote:
>
> __builtin_types_compatible_p() has been around since gcc 2.95, and we
> don't use it anywhere. This patch quietly fixes that.
After staring at this for about 2 minutes, how about a commit message like:
Make
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
diff -r f0ff8138f993 include/linux/kernel.h
--- a/include/linux/kernel.hFri Mar 09 16:40:25 2007 +1100
+++
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r f0ff8138f993 include/linux/kernel.h
--- a/include/linux/kernel.hFri Mar 09 16:40:25 2007 +1100
+++
On Fri, 09 Mar 2007 16:56:32 +1100 Rusty Russell [EMAIL PROTECTED] wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
After staring at this for about 2 minutes, how about a commit message like:
Make ARRAY_SIZE
On Fri, 9 Mar 2007, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Whee.
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
On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95,
but it's not available in Intel C compiler IIRC :(
and we don't use it anywhere. This patch quietly fixes that.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff
On Fri, Mar 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95, and we
don't use it anywhere. This patch quietly fixes that.
Signed-off-by: Rusty Russell [EMAIL PROTECTED]
diff -r f0ff8138f993 include/linux/kernel.h
---
On Fri, Mar 09, 2007 at 09:50:56AM +0300, Andrey Panin wrote:
On 068, 03 09, 2007 at 04:56:32PM +1100, Rusty Russell wrote:
__builtin_types_compatible_p() has been around since gcc 2.95,
but it's not available in Intel C compiler IIRC :(
So what?
-
To unsubscribe from this list: send the
58 matches
Mail list logo