Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!oliveb!felix!dhw68k!david From: david@dhw68k.cts.com (David H. Wolfskill) Newsgroups: comp.lang.c Subject: Re: strcpy wars, jeez! A proposed resolution. Message-ID: <6286@dhw68k.cts.com> Date: 28 Mar 88 17:16:54 GMT References: <7712@apple.Apple.Com> <7485@brl-smoke.ARPA> <10731@mimsy.UUCP> <7506@brl-smoke.ARPA> <4251@hoptoad.uucp> Reply-To: david@dhw68k.cts.com (David H. Wolfskill) Organization: Wolfskill residence; Anaheim, CA (USA) Lines: 27 Summary: Change "undefined" to "implementation defined"? As many have pointed out, there is an expectation that strcpy() will copy characters from left to right, terminating the copy when the terminating NUL is copied. Recalling that the dpANS specifies "... the behavior of an abstract machine in which the issues of optimization are irrelevant," it would seem to make some sense to modify the specification to be similar to the above. The current dpANS also specifies "If copying takes place between objects that overlap, the behavior is undefined." I would feel rather more comfortable with changing that to read "... implementation defined." This may arguably be a "quality of implementation" issue; I prefer to think of it as a "quality of standard" issue. (Oh: I do know of one machine in which fields in main storage are addressed on the right -- for almost all instructions -- but I don't know of a C compiler for it, and I consider its architecture (for this reason, as well as others) to be sufficiently pathological that it's not worth considering important. I just wish my employer hadn't purchased so many of the brain-damaged things!) david -- David H. Wolfskill uucp: ...{trwrb,hplabs}!felix!dhw68k!david InterNet: david@dhw68k.cts.com