Noalias trivia question

T. William Wells bill at proxftl.UUCP
Tue Jun 14 09:51:26 AEST 1988


In article <14522 at brl-adm.ARPA>, dsill at nswc-oas.arpa (Dave Sill) writes:

> You are implying that programmers can solve unsolvable problems but
> that programs cannot, which is simply not true.

Actually, you should keep your referents straight.  I might be
implying that humans can solve problems that are unsolvable by
COMPUTERS.  The truth of that is a matter of conjecture.

This of course ignores the fact that aliasing is a property of
the DESIGN of the program, not just of the program itself.  It is
entirely possible to design a program which has some particular
aliasing property which can't be found by inspecting the code.
Consider this contrived example:

	scanf("%d %d", &i, &j);
	p = &a[i];
	q = &a[j];

Can p and q point to the same object?  In the general case, yes.
However, the programmer might intend this to be in a system where
the two numbers can never be the same.  So, the noalias keyword
would add information that is not present in the program.



More information about the Comp.lang.c mailing list