Whither _noalias_?

Henry Spencer henry at zoo.toronto.edu
Thu Feb 7 16:09:17 AEST 1991


In article <ENAG.91Jan14003710 at svarte.ifi.uio.no> enag at ifi.uio.no (Erik Naggum) writes:
>I haven't seen any mention of "noalias" in ANSI C compilers I've
>talked to, so I just wonder if I wasn't alone in not really grasping
>what noalias was good for and why its introduction was required.

Its purpose was to let the programmer tell the compiler that arguments to
a function were not aliases for each other, for the sake of optimization
on vector machines and the like.  The optimizing people really cared about
it.  Unfortunately, (a) the description was exceedingly cryptic and repeated
efforts failed to produce one that "did the right thing", (b) it spread
slimy tentacles everywhere in the standard libraries, and (c) it was
introduced far too late in the development of the standard.  The result
was a firestorm of protest, including a declaration of war :-) from Dennis
Ritchie and formal threats to vote against ratification of ANSI C as ISO C.
The committee backed down and removed it.

You really need to get a copy of the final standard; drafts that old are
not reliable references.
-- 
"Maybe we should tell the truth?"      | Henry Spencer at U of Toronto Zoology
"Surely we aren't that desperate yet." |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list