Re: [PATCH] Fix BUILD_BUG_ON in fs/compat_ioctl.c to build withgcc 4.5 snapshot

From: Andi Kleen
Date: Mon Dec 21 2009 - 05:51:46 EST


On Mon, Dec 21, 2009 at 09:02:39PM +1030, Rusty Russell wrote:
> On Mon, 21 Dec 2009 03:23:15 am Andi Kleen wrote:
> > Fix BUILD_BUG_ON in fs/compat_ioctl.c to build with gcc 4.5 snapshot
> >
> > The BUILD_BUG_ON in compat_ioctl_check_table() fails
> > with a recent gcc mainline snapshot (gcc version 4.5.0 20091219)
> > (GCC)), even though it works with older compilers.
>
> We have a proper fix for BUILD_BUG_ON which I sent Linus a pull req for,
> but I think it was too late:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git BUILD_BUG_ON
>
> It's not really high priority, but it'd be nice to fix this properly.

AFAIK the code I fixed was not correct in the first place because
"const int xxx" is not a constant expression in the standards sense.

So it's orthogonal to whatever changes you come up.

Building on gcc 4.5 is at least medium priority I would say.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/