Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Tue, 30 Dec 2003 12:37:18 +1100 | From | Rusty Russell <> | Subject | Re: GCC 3.4 Heads-up |
| |
On Thu, 25 Dec 2003 20:46:48 -0500 Chris Meadors <clubneon@hereintown.net> wrote:
> I know it isn't the recommended compiler, heck it isn't even released > yet, but I was messing around with a GCC 3.4 snapshot, and figured I'd > give compiling the 2.6.0 kernel a shot. > > Other than the constant barrage of warnings about the use of compound > expressions as lvalues being deprecated* (mostly because of lines 114, > 116, and 117 of rcupdate.h, which is included everywhere), the build > goes very well.
Thanks, downloaded this and tried it. It's complaining about:
#define per_cpu(var, cpu) ((void)cpu, per_cpu__##var)
There are several ways of fixing this, but the simplest is:
#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var))
Cheers, Rusty. -- there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.0/include/asm-generic/percpu.h working-2.6.0-new-gcc/include/asm-generic/percpu.h --- linux-2.6.0/include/asm-generic/percpu.h 2003-09-22 10:26:12.000000000 +1000 +++ working-2.6.0-new-gcc/include/asm-generic/percpu.h 2003-12-30 12:35:20.000000000 +1100 @@ -29,7 +29,7 @@ do { \ #define DEFINE_PER_CPU(type, name) \ __typeof__(type) per_cpu__##name -#define per_cpu(var, cpu) ((void)cpu, per_cpu__##var) +#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var #endif /* SMP */ - 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/
| ![\](/images/icornerr.gif) |