Article View: comp.std.c
Article #2331Re: Why no arithmetic on void *
From: Doug Gwyn
Date: Fri, 25 Jan 1991 17:51
Date: Fri, 25 Jan 1991 17:51
14 lines
1321 bytes
1321 bytes
In article <279D93D3.5EE7@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes: >"sizeof(char)==1" is hard-coded into innumerable calls to fread() and >other library functions. I had to figure out the ramifications when I wrote my "short char" proposal. Actually there are enough problems with use of fread() etc. that I don't think much more work would be needed to accommodate sizeof(char)>1 than is already necessary to properly include <stdio.h>, use size_t, etc. Also note that in any implementation where it was decided to make sizeof(char) remain 1, the existing usage would not be a problem. For quite some time I had been writing code that did not assume sizeof(char)==1, just in case. Now that the standard requires sizeof(char)==1, I don't think there is any real chance that it will ever change, so one can safely assume that constraint.
Technical Details
Message-ID:
<14978@smoke.brl.mil>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwynReferences:
<561@taumet.com> <1991Jan22.211212.14692@Think.COM> <279D93D3.5EE7@tct.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Why no arithmetic on void * Message-ID: <14978@smoke.brl.mil> Date: 25 Jan 91 17:51:22 GMT References: <561@taumet.com> <1991Jan22.211212.14692@Think.COM> <279D93D3.5EE7@tct.uucp> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14