linux-mips
[Top] [All Lists]

Re: Issue with BUG() in asm-gemeric/bug.h if CONFIG_BUG=n

To: David Daney <ddaney.cavm@gmail.com>
Subject: Re: Issue with BUG() in asm-gemeric/bug.h if CONFIG_BUG=n
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Mon, 30 Sep 2013 21:03:28 +0200
Cc: "Pinski, Andrew" <Andrew.Pinski@caviumnetworks.com>, Ralf Baechle <ralf@linux-mips.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>, David Howells <dhowells@redhat.com>, Markos Chandras <Markos.Chandras@imgtec.com>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, John Crispin <blogic@openwrt.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6rNZKnhnbyhXwg3Bx1f10d/tJYLL3TJSYyyzYaDBRzg=; b=sx9/SM+d2jYmk0jvK0aH3cvNgwhKUs0EmK8u3ZUOsmIsgml0JXlkEb4aU1nHWUuuGK st5TSM+W0C1/5/OLrCeeqeUNsoP89VCAz5Svi3Xgg+25uOKiG7Xq14vWj7dijJ+v3gmx kLQUHDMemC4gk8mB4nq05mn7VfNTrjksF0powE9wPdv7CZS95MulpDBYX1hJnRWkuPkw N5qaazzz3lqfyFbHm5/XzdsiDZ4GMQzbeOwpeNbRqAGaUnbaHHxY+aiI88M6QruqBIhc bN/7tL8YETfKqegMOLt3/BePiRkzph3yvrE0t2H+godUB+WUhaTodcCfogT/gYeQ5xP9 P2DQ==
In-reply-to: <5249B8A4.9070905@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20130930145630.GA14672@linux-mips.org> <52499E8B.6000702@gmail.com> <C9BC92C2-A7F5-4F9A-B001-D1A7F4ADEA5A@caviumnetworks.com> <5249B8A4.9070905@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Mon, Sep 30, 2013 at 7:45 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> What about using __builtin_unreachable when we can but turn off warnings
>> and use do{}while(0) when __builtin_unreachable does not exist?  This seems
>> the both worlds.  Newer compilers produce better code with unreachable
>> anyways.
>>
>
> Simply not true.
>
> do{}while(0) is a NOP it is no more useful than an ';' statement.  It
> doesn't serve as a magic uninitialized variable hiding mechanism.

You missed the "turn off warnings" part of the "and".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>