Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2002-11-14 13:37:06


Kevin S. Van Horn wrote:
> Looks like I may be wrong about the C++ Standard guaranteeing at least 32
> bits to signed/unsigned int. I know I read this before, and I've seen it
> claimed on a web site, but I can't find it in the Standard. Maybe I read
> it in the draft Standard, and it didn't make the final cut.
>

I think what you were looking for is footnote 39:

3.9.1/2 says that "Plain ints have the natural size suggested by the
architecture of the execution environment (footnote 39 that is, large
enough to contain any value in the range of INT_MIN and INT_MAX, as
defined in the header <climits>.)"

limits.h is defined in 5.2.4.2.1 of the C89 standard (which I don't have
a copy of) BUT

5.2.4.2.1/1 of the C99 standard says that an int must be able to support
values in the range INT_MIN to INT_MAX, which must be at least -32767
and 32767, or 16 bits. I imagine that 5.2.4.2.1 of the C89 standard
says the same thing.

-- 
-------------------------------------------------------------------------------
Kevin Lynch				voice:	(617) 353-6025
Physics Department			Fax: (617) 353-9393
Boston University			office:	 PRB-361
590 Commonwealth Ave.			e-mail:	 krlynch_at_[hidden]
Boston, MA 02215 USA			http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk