[lkml]   [2001]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.4.15-pre4 compile problem
In article <>,
Daniel I. Applebaum <> wrote:
>While compiling 2.4.15-pre4:
>gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o setup.o setup.c
>setup.c: In function `c_start':
>setup.c:2791: subscripted value is neither array nor pointer

Ugh. That's because a buggy #define on UP in x86.

It should be trivially fixed by changing include/asm-i386/processor.h:

#define cpu_data &boot_cpu_data


#define cpu_data (&boot_cpu_data)

in order to get the right parsing order for all users of cpu_data. Ie
just add the parenthesis around the thing.

Oh, well. "Always put parentesis around define-expands" is a really
really good rule. Along with "Always put parenthesis around the
argument expansion too".

Oh, and cleaning up the particular offending user will hide the problem
too, if you just use


instead of using


in arch/i386/kernel/setup.c: c_start(). Which is cleaner and simpler
anyway, and which is defined by C to be exactly the same thing (as long
as "cpu_data" behaves like a real array, not a broken #define that
depends on operator precedence around it).

I'll do both in my tree. Thanks,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [W:0.067 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site