can/should we use gcc 3.1 to compile kernels

Franz Sirl Franz.Sirl-ppc at
Sat Jun 8 06:36:46 EST 2002

At 22:19 07.06.2002, Tom Rini wrote:

>On Fri, Jun 07, 2002 at 03:44:56PM -0400, Kevin B. Hendricks wrote:
> > Not too bad warnings-wize excpet for the controlfb.c where it constanly
> > gave a funny warning about "pasting ->".
>Sounds right.  I think there was a few other things too..

The warning is correct, pasting "token1" (CNTRL_REG) with "token2" (->)
makes no sense, usually it's just a ## to much somewhere.

> > It did this for every occurence of the macro CNTRL_REG which I must admit
> > has two ## which I think gcc was misinterpreting somehow.
>Well, isn't:
>#define x(foo) a_## foo ##_b
>A semi-common thing, like we do in indirect_pci.c ?  Or was it something

Think about preprocessing tokens! If foo is "->" the ## make no sense at
all, cause "a_", "->" and "_b" are 3 separate preprocessing tokens, no need
to paste them together.

> > Other than that just the occaissioanal wanring about unused variables and
> > things like that.
>Lots of the USB stuff uses __FUNCTION__ which gcc-3.1 isn't happy

It's not __FUNCTION__ per se that gcc is unhappy about, but string
concatenation with it. So instead of printk ( __FUNCTION__ "text %d",
value) use printk (" %s, text %d", __FUNCTION__, value). No big deal.

I think current 3.2 already refuses to compile that.


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list