Re: IA32 (2.6.2 - 2004-02-05.22.30) - 3 New warnings (gcc 3.2.2)

From: viro
Date: Fri Feb 06 2004 - 13:51:15 EST


On Fri, Feb 06, 2004 at 10:42:00AM -0800, Linus Torvalds wrote:
>
>
>
> On Fri, 6 Feb 2004 viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> >
> > Umm... How about
> >
> > static inline void BUG() __attribute__((noreturn));
> >
> > static inline void BUG(void)
> > {
> > __asm__ ....
> > }
>
> Did you try that? Last time I tried, gcc would complain every time it saw
> the thing about "noreturn function does return".

So it does ;-/

Anyway, in both of those cases BUG() is gratitious. What that code tries
to do is "if we decided to use one of the old modes, we'll need 3 ports;
otherwise we should claim 8". So simple if() would be enough. I'll send
a patch in a few.

It would be nice to have gcc understand that BUG() is a sink. Oh, well...
-
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/