Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!.POSTED!not-for-mail From: Willem Newsgroups: comp.lang.c Subject: Re: C programming in 2011 Date: Thu, 26 May 2011 17:29:38 +0000 (UTC) Organization: Stack Usenet News Service Lines: 32 Message-ID: References: <4dde5e06$0$20221$426a34cc@news.free.fr> <4dde7054$0$5886$426a74cc@news.free.fr> NNTP-Posting-Host: toad.stack.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: mud.stack.nl 1306430978 84825 2001:610:1108:5010::135 (26 May 2011 17:29:38 GMT) X-Complaints-To: abuse@stack.nl NNTP-Posting-Date: Thu, 26 May 2011 17:29:38 +0000 (UTC) User-Agent: slrn/0.9.9p1 (FreeBSD) Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:4808 Branimir Maksimovic wrote: ) On Thu, 26 May 2011 17:23:01 +0200 ) Francois Grieu wrote: ) )> On 26/05/2011 16:21, Branimir Maksimovic wrote: )> > On 05/26/2011 04:04 PM, Francois Grieu wrote: )> >> [3] some compilers know that, when j is an int, )> >> if (j<1 || j>8) )> >> foo(); )> >> can be rewritten as )> >> if ((unsigned)j-1u>7u) )> >> foo(); )> > )> > No, it can't. )> )> Would you please illustrate by an example when that does not stand? ) ) When j is in range [-8 , 0] ) ) Actually: if(j < -8 || j > 8) ) can be rewritten as: if((unsigned)j>8) Is this meant to be some kind of joke ? SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT