Thatīs the following code :
[...]
struct simp {
/* 1st cache lines */
struct per_processor private[NR_PROCESSORS];
/* next cache line */
struct header * usable_list;
spinlock_t lock;
char fill[sizeof(void*) - sizeof(spinlock_t)];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
long real_size;
long max_elems;
structor again_ctor;
structor first_ctor;
structor dtor;
long fill2;
[...]
I checked <asm/spinlock.h> :sizeof(spinlock_t) is 8 for x86 SMP. And
sizeof(void*) is 4. So there is a negative array size.
The code compiles with gcc-2.7.2.1 . This is IMHO a bug .
-- ------------------------------------------------------------------------------ Markus <markus.kossmann@inka.de> (Markus Kossmann)