can/should we use gcc 3.1 to compile kernels

Kevin B. Hendricks kevin.hendricks at sympatico.ca
Sat Jun 8 09:39:44 EST 2002


Hi,

FYI: I counted 1175 occurences of warnings like the following:

inode.c:2462: warning: concatenation of string literals with __FUNCTION__
is deprecated

So I hope someone has a nice sed or awk script to fix all of these in some
automatic way.

Kevin


> > > 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.
> >
> >I thought it was 3.1 that gave a big warning about __FUNCTION__ being
> >depreciated entirely and 3.2 which just removed __FUNCTION__ at all.
> > Or have things been changed abit?
>
> No, but the warning was always about "string concatenation":
> [fsirl at entropy:~]$ cat FUNCTION.c
> #include <stdio.h>
> int main (void)
> {
>    printf (__FUNCTION__ " text %d", 5);
>    printf ("%s text %d", __FUNCTION__, 5);
>    return 0;
> }
> [fsirl at entropy:~]$ gcc -O2 FUNCTION.c
> FUNCTION.c: In function `main':
> FUNCTION.c:5: warning: concatenation of string literals with
> __FUNCTION__ is deprecated
>
> So, only one warning is issued.
>
> Franz.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/




More information about the Linuxppc-dev mailing list