Date: Tue, 22 Nov 2011 15:52:39 +0100 From: Joerg Sonnenberger <joerg@britannica.bec.de> To: svn-src-all@freebsd.org Subject: Re: svn commit: r227812 - head/lib/libc/string Message-ID: <20111122145239.GB19875@britannica.bec.de> In-Reply-To: <8B1C6EE4-A351-44A6-AC8A-DC53779CD380@FreeBSD.org> References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <CAMBSHm8HfW-XTSk9zQda4vDmbrzyEG_vnydb5JZyHaNh2rF4gw@mail.gmail.com> <20111122210422.E8674@besplex.bde.org> <8B1C6EE4-A351-44A6-AC8A-DC53779CD380@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 22, 2011 at 02:20:15PM +0000, David Chisnall wrote: > In this case, either | or || is fine, because neither reads any memory > or has side effects so | and || are equivalent to the compiler, but > the use of | tells a human reading the code that the order is unimportant. The use of | is just more obscure. The compiler can easily interfere here that the execution order is irrelevant as the statements are side effect free. Joerg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111122145239.GB19875>