lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10f740e80909120022m72ad5ea7t692fba93cd3114e9@mail.gmail.com>
Date:	Sat, 12 Sep 2009 09:22:43 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	David Daney <ddaney@...iumnetworks.com>
Cc:	Michael Buesch <mb@...sch.de>, linuxppc-dev@...ts.ozlabs.org,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	linux-mips@...ux-mips.org,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	linuxppc-dev@...abs.org, Paul Mackerras <paulus@...ba.org>,
	"H. Peter Anvin" <hpa@...or.com>, linux-s390@...r.kernel.org,
	linux-am33-list@...hat.com, Helge Deller <deller@....de>,
	x86@...nel.org, Ingo Molnar <mingo@...hat.com>,
	Mike Frysinger <vapier@...too.org>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Henderson <rth@...ddle.net>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
	ralf@...ux-mips.org, Kyle McMartin <kyle@...artin.ca>,
	linux-alpha@...r.kernel.org,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux390@...ibm.com,
	Koichi Yasutake <yasutake.koichi@...panasonic.com>
Subject: Re: [PATCH 01/10] Add support for GCC-4.5's __builtin_unreachable() 
	to compiler.h

On Fri, Sep 11, 2009 at 17:58, David Daney<ddaney@...iumnetworks.com> wrote:
> Michael Buesch wrote:
>>
>> On Friday 11 September 2009 01:56:42 David Daney wrote:
>>>
>>> +/* Unreachable code */
>>> +#ifndef unreachable
>>> +# define unreachable() do { for (;;) ; } while (0)
>>> +#endif
>>
>> # define unreachable() do { } while (1)
>>
>> ? :)
>
> Clearly I was not thinking clearly when I wrote that part.  RTH noted the
> same thing.  I will fix it.

However, people are so used to seeing the `do { } while (0)' idiom,
that they might miss
there's a `1' here, not a `0'.

So perhaps it's better to use plain `for (;;)' for infinite loops?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ