Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 12 May 2011 06:51:15 -0500 Message-ID: <4DCBC9AE.6BA@mindspring.com> Date: Thu, 12 May 2011 07:51:10 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Would someone tell me if I'm on the wrong track? References: <70cf2865-5c4a-47a5-a8e8-ac369c2b91b3@k22g2000yqh.googlegroups.com> <4dca2cf0$0$18239$4fafbaef@reader2.news.tin.it> <35d5a07f-b868-4f6e-83fd-e333baba79fc@gu8g2000vbb.googlegroups.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 20 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.223.89 X-Trace: sv3-BbUpsUmqjepxKnu4C9n2pwHaw+gc8o7F8cREo53f05TfGvgtEnXQfTzKqNVsMQqqdpTOnnfbME9jDz3!P2HPrjB55ZVy0Z8V1guc7A6BfnjDV8mm5pxZzLqMLjjzGaV0XBoondQor+WOvRC4DfqvNVKFvbWP!VXbnQLe6 X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1673 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:3796 Seebs wrote: > > On 2011-05-12, luser- -droog wrote: > > unsigned sz; > > (int) sz < 0 > > > > Does this just check the high bit (assuming 2's complement)? > > Not necessarily. > > If you're comfortable assuming 2s complement, > I bet you can do better with: > sz > INT_MAX I don't see anything unusual about an unsigned int object holding a value greater than INT_MAX. -- pete