strcpy wars, jeez! A proposed resolution.

The Beach Bum jfh at killer.UUCP
Wed Apr 13 07:49:22 AEST 1988


In article <6683 at dhw68k.cts.com> david at dhw68k.cts.com (David H. Wolfskill) writes:
>[I had suggested that strcpy() on overlapping objects ought to be
>"implementation-defined," rather than "undefined," behavior.  Liber
>then wrote "If you have overlapping strings you have incorrect data."

this is exactly what we don't need.  the purpose of creating a standard
is for all implementations of the standard to function identically.
if each different implementation has a different behavior, all of which
are being relied on quite heavily, then software will cease to be
portable.

"undefined" is "defined".  stating that the behavior is unknown will
force the user to not rely on questionable behavior, or to write the
code herself to perform the copy in the correct fashion.

- john.
-- 
John F. Haugh II                  SNAIL:  HECI Exploration Co. Inc.
UUCP: ...!ihnp4!killer!jfh                11910 Greenville Ave, Suite 600
"You can't threaten us, we're             Dallas, TX. 75243
  the Oil Company!"                       (214) 231-0993 Ext 260



More information about the Comp.lang.c mailing list