Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.lang.c Subject: Re: sizeof (integral types) Message-ID: <1467@auspex.auspex.com> Date: 19 Apr 89 07:19:09 GMT References: <12005@paris.ics.uci.edu> <10044@smoke.BRL.MIL> <29127@apple.Apple.COM> <10064@smoke.BRL.MIL> <29193@apple.Apple.COM> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 27 >Considering that C++ is an *EXTENSION* of C (and was written with K&R as >active participants), the fact that C++ talks about longs as at least 24 bits >is true for C as well. Assuming that every statement made about C++ of that sort must *ipso facto* apply to C, I guess that's true, since the pANS says that longs must hold values in a range that, in binary, requires 32 bits, and 24 is greater than 32.... However, K&R I makes no statement about "long"s, and the pANS quite clearly says, for binary implementations, "32 bits", not "24 bits". However, the fact that C++ talks about the "class" keyword doesn't make it a C keyword - since C++ is an extension of C, there are a lot of things C++ talks about that *aren't* true of C. As such, the assumption in paragraph 1) isn't true, so C++ isn't all that relevant in this particular case anyway. On top of that, the C++ Reference Manual appendix of the first edition of S (is there a second edition?) sayeth nothing about the minimum size of a "long", and the section that *does* say somthing merely says that "it is usually reasonable to assume" that a "long" has at least 24 bits, and right after it says quite explicitly that "even this rule of thumb does not apply universally." In short, the statement in the C++ book has nothing authoritative to say whatsoever about the sizes of "long"s in C - and it doesn't even seem to have anything authoritative to say about the sizes of "long"s in C++!