"Noalias" warning and questions
Jerry Schwarz
jss at hector.UUCP
Tue Feb 16 04:47:34 AEST 1988
In article <7249 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <8012 at elsie.UUCP> ado at elsie.UUCP (Arthur David Olson) writes:
>
>This is not new; in earlier working drafts this injunction was given
>in English near the beginning of Section 4; now it is expressed more
>directly in the function interface definitions, using "noalias".
>The one hold-out is memmove(), which explicitly DOES permit overlap.
>
>If "noalias" should disappear (a distinct possibility!), we would
>have to put back the English injunction against overlapping *arguments.
>
You still need the English words. All "noalias" says is that certain
patterns of referencing using the pointers are undefined, unless you
know what patterns the function will use you don't know what
arguments will result in undefined behavior. In strcpy for example
you still need words to tell you that there cannot be overlap.
As another recent item pointed out, in strcmp you need something else
(const) to tell you that the "noalias" in the declarations are noise.
Jerry Schwarz
More information about the Comp.lang.c
mailing list