Article View: gnu.misc.discuss
Article #1872Re: Coding Standards are ignorant
From: Norman Diamond
Date: Thu, 21 Mar 1996 03:51
Date: Thu, 21 Mar 1996 03:51
27 lines
2334 bytes
2334 bytes
In article <MIB.96Mar19105603@gnu.ai.mit.edu>, mib@gnu.ai.mit.edu (Michael I. Bushnell, p/BSG) writes: >In article <314db547.242588844@nntp.ix.netcom.com> miker3@ix.netcom.com (Mike Rubenstein) writes: >>You most certainly are guarantteed that long is the widest signed integral >>type and unsigned long is the widest unsigned integral type by ISO 6.1.2.5. [Caveat on sloppy wording in the standard which will probably be fixed.] >It appears you are correct. Then the flaw is that you are prohibited >from using more than four widths of integers. That's a mistake, which >we will all rue when the first 128 bit machines come out. ;-) Actually one famous mistake is already known with 64 bit machines. 8-bit char, 16-bit short, 32-bit int, 64-bit long is technically valid but it is weird for int to have a different size from both short and long. Another mistake was already known at the time of K&R-1, when there was only one size for char but one of their cited implementations was on a machine which had two sizes for char (either 6 or 9 bits). Another mistake has been known for a couple of decades, making char the unit size for most C operations when characters actually require 16 or 32 bits (or varying numbers of bits in some encoding schemes) while the most popular unit size is 8 bits. -- << If this were the company's opinion, I would not be allowed to post it. >> "I paid money for this car, I pay taxes for vehicle registration and a driver's license, so I can drive in any lane I want, and no innocent victim gets to call the cops just 'cause the lane's not goin' the same direction as me" - J Spammer
Technical Details
Message-ID:
<4iqjo4$2c2@usenet.pa.dec.com>Path:
arc1-ca.pugleaf.net!tbj.dec.com!diamondReferences:
<4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar15170902@gnu.ai.mit.edu> <wyraut5fqq.fsf@dns.bluesky.net> <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net> <MIB.96Mar18105957@gnu.ai.mit.edu> <314db547.242588844@nntp.ix.netcom.com> <MIB.96Mar19105603@gnu.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tbj.dec.com!diamond From: diamond@tbj.dec.com (Norman Diamond) Newsgroups: gnu.misc.discuss,comp.std.c Subject: Re: Coding Standards are ignorant Date: 21 Mar 1996 03:51:32 GMT Organization: Digital Equipment Corporation Japan , Tokyo Message-ID: <4iqjo4$2c2@usenet.pa.dec.com> References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar15170902@gnu.ai.mit.edu> <wyraut5fqq.fsf@dns.bluesky.net> <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net> <MIB.96Mar18105957@gnu.ai.mit.edu> <314db547.242588844@nntp.ix.netcom.com> <MIB.96Mar19105603@gnu.ai.mit.edu> Reply-To: diamond@tbj.dec.com (Norman Diamond) NNTP-Posting-Host: jit533.tbj.dec.com