Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.lang.c Subject: Re: sizeof (integral types) Message-ID: <1478@auspex.auspex.com> Date: 21 Apr 89 05:56:16 GMT References: <29127@apple.Apple.COM> <8.UUL1.3#5109@pantor.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 17 >Nothing in C or C++ is _guaranteed_ about sizes except > 1 == sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long). Possibly true of C++ and of pre-ANSI C; however, once the standard is approved and compilers start claiming conformance, anybody who claims that their compiler conforms but whose compiler doesn't have: a "char" type that holds values between -127 and 127; an "unsigned char" type that holds values between 0 and 255; a "short" or "int" type that holds values between -32767 and 32767; an "unsigned short" or "unsigned int" type that holds values between 0 and 65535; a "long" type that holds values between -(2^31-1) and (2^31-1); an "unsigned long" type that holds values between 0 and (2^32-1); is lying.