noalias, again (was extern const)

Dr. T. Andrews tanner at ki4pv.uucp
Fri Mar 25 11:11:23 AEST 1988


In article <10731 at mimsy.UUCP>, chris at mimsy.UUCP (Chris Torek) writes:
 [ cites "strcpy" definition in latest draft, includes \fInoalias\fP,
   gives clear example of code now broken by X3J11:
   f() { char buf[SIZE]; int n;  /* ... */
	/* remove leading junk (n < strlen(buf)) */
	(void)strncpy(buf, buf+n);
  ]

It should be noted that at one time, the idea of this standardization
effort was to codify existing practice.

Breaking existing, useful code is hard to justify under the banner of
existing practice.  Must we now come up with some sort of quasi-standard
replacement for "strcpy" and friends, free of this "noalias" (and also
perhaps "const", depending on the final wording of "const") boondoggle,
if we are to write useful code that deals with strings?  DMR, where are
you when we need you?
-- 
{allegra clyde!codas decvax!ucf-cs ihnp4!codas killer}!ki4pv!tanner



More information about the Comp.lang.c mailing list