Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: What does the "L" mean Date: Thu, 05 Dec 2019 10:03:10 -0800 Organization: None to speak of Lines: 25 Message-ID: References: <1m8iuedmre4j8aiadhohmcaskje6ghirle@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="da89403a4552c036ad5613d4ddacd701"; logging-data="6035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KbyHsz/bPnfrCdAos6JvT" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:894xWy37n5s58ZzN5gxXsUY+ilk= sha1:XGr1ikb1FwinCnnNVVRT4wij2ZM= Xref: csiph.com comp.lang.c++:70291 Robert Wessel writes: > On Wed, 04 Dec 2019 08:28:23 -0800, Keith Thompson > wrote: [...] >>A conforming implementation could make long int any size 32 bits >>or wider. The size in bits is a multiple of CHAR_BIT, which is at >>least 8. An implementation could have 33-bit long int; on such a >>system characters would have to be either 11 or 33 bits. > > To be pedantic, aren't longs allowed to have pad bits? Thus you could > have a 33-bit long stored in five 8-bit characters. Yes, C++ permits padding bits (bits that do not contribute to the value). You're suggesting a long type with a *size* of 5 bytes / 40 bits and a *width* of 33 bits, which is permitted. (The width includes the sign bit.) When I wrote "33-bit long int", I meant CHAR_BIT * sizeof (long int) == 33 I could have made that clearer. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */