"Noalias" warning and questions

Jerry Schwarz jss at hector.UUCP
Tue Feb 16 04:54:57 AEST 1988


In article <213 at sdrc.UUCP> scjones at sdrc.UUCP (Larry Jones) writes:
>
>The same thing as it does in the "strcmp" declaration - basically nothing.
>It's really only applicable to output arguments but we decided to put it
>on all the library pointers for consistency's sake.

This is false "consistency".  It makes the declarations harder to
read and it is misleading.  When I see a "noalias" I expect that some
aliasing patterns are being prohibited (i.e. result in undefined
behavior).  To gratuitously add "noalias" where no  patterns are
being prohibited can only add to confusion and completely defeats
whatever minor gains in "documentation" you get from adding "noalias"
to declarations of functions like "strcpy".

It would also be consistent (and in my opinion better) to never use
"noalias".

Jerry Schwarz
Bell Labs.



More information about the Comp.lang.c mailing list