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: Sat, 11 Jun 2011 19:07:09 -0500 Message-ID: <4DF40331.650A@mindspring.com> Date: Sat, 11 Jun 2011 20:07:13 -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: a doubt about c References: <7523b6ca-ef28-41c3-99d8-c60273641ddf@glegroupsg2000goo.googlegroups.com> <4DF3AC4F.502B@mindspring.com> <1bwrgs3z3t.fsf@snowball.wb.pfeifferfamily.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.221.250 X-Trace: sv3-LTv1ehIxsZb0VvaEMvVBGLdXdtyc7zD7uyTQ7FarcJdaKezJIps+yV3oba5Rg2MpA0VA81HjYB3d/Pt!Uej8jc3GEFtkYpzjSt/cGPZd5DXnS9xqKTZmqRdPEpnRgNM7XFebjACKdDpwyPtRbOHHpV0jbW69!BH+kwEHZpi8= 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: 2347 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:5873 Nobody wrote: > > On Sat, 11 Jun 2011 14:13:58 -0600, Joe Pfeiffer wrote: > > > A brief search of the C99 standard failed to turn this up. I was able > > to find (in 6.2.5): > > > > A ``plain'' int object has the natural size suggested by the > > architecture of the execution environment (large enough to contain > > any value in the range INT_MIN to INT_MAX as defined in the header > > ). > > > > (which doesn't say you can't have a 1-byte int). That said, I don't > > think I've ever encountered a compiler (even for an 8 bit processor) > > that didn't use at least a 16 bit int. > > From 5.2.4.2.1, the smallest permitted values for for INT_MIN and INT_MAX > are: > > -- minimum value for an object of type int > INT_MIN -32767 // -(215-1) > > -- maximum value for an object of type int > INT_MAX +32767 // 215-1 > > So you can only have a 1-byte int if you have 16-bit bytes. ... or bytes with more than 16 bits. -- pete