lkml.org 
[lkml]   [2003]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH][2.5.74] correct gcc bug comment in <linux/spinlock.h>
On Thu, 3 Jul 2003 17:42:04 +0100, Russell King wrote:
>On Thu, Jul 03, 2003 at 06:08:11PM +0200, Mikael Pettersson wrote:
>> Linus,
>>
>> This patch updates include/linux/spinlock.h's comment regarding gcc
>> bugs for empty struct initializers, to correctly state that the bug
>> is present also in 2.95.x and at least early versions of 2.96 (as
>> reported by one Mandrake user).
>>
>> /Mikael
>>
>> --- linux-2.5.74/include/linux/spinlock.h.~1~ 2003-07-03 12:32:46.000000000 +0200
>> +++ linux-2.5.74/include/linux/spinlock.h 2003-07-03 16:07:59.772534704 +0200
>> @@ -144,7 +144,7 @@
>> } while (0)
>> #else
>> /*
>> - * gcc versions before ~2.95 have a nasty bug with empty initializers.
>> + * gcc versions up to 2.95, and early versions of 2.96, have a nasty bug with empty initializers.
>> */
>> #if (__GNUC__ > 2)
>> typedef struct { } spinlock_t;
>
>This also isn't that clear (does it mean up to 2.95.0 but not including
>2.95.1 etc.) Also, we don't build with gcc < 2.95 anyway, so there's
>no need to mention anything older. This removes the doubt:
>
>"All gcc 2.95 versions and early versions of gcc 2.96 have a nasty bug with
> empty initializers."

Agreed. More precision is better. Updated patch below.

/Mikael

--- linux-2.5.74/include/linux/spinlock.h.~1~ 2003-07-03 12:32:46.000000000 +0200
+++ linux-2.5.74/include/linux/spinlock.h 2003-07-04 02:01:05.982375152 +0200
@@ -144,7 +144,8 @@
} while (0)
#else
/*
- * gcc versions before ~2.95 have a nasty bug with empty initializers.
+ * All gcc 2.95 versions and early versions of 2.96 have a nasty bug
+ * with empty initializers.
*/
#if (__GNUC__ > 2)
typedef struct { } spinlock_t;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.034 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site