Re: [PATCH 02/10] x86: Convert BUG() to use unreachable()

From: H. Peter Anvin
Date: Sun Sep 13 2009 - 16:13:44 EST


On 09/11/2009 08:55 AM, David Daney wrote:
>
> Perhaps, although with a pre-GCC-4.5 compiler, it would end up adding
> the endless loop code to BUG() sites for configurations where the user
> has explicitly stated their preference for the code to be as small as
> possible (by turning off CONFIG_BUG).
>
> If that is acceptable, I will prepare another revision of the patch set.
>

The thing is that without the loop, the compiler will generate the
fall-through case code, which may add more code than the loop removes.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
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/