"Numerical Recipes in C" is nonport

mcdonald at uxe.cso.uiuc.edu mcdonald at uxe.cso.uiuc.edu
Tue Sep 6 00:17:00 AEST 1988



>There exist machines whose protection philosophy is to prevent you from
>even thinking something illegal.  In particular, on the Unisys A-series,
>the compiler must implement all memory addressing protection--there is
>no kernel/user state protection on memory.*  A program cannot be allowed
>to form an invalid address, as there is nothing to stop it from using it,
>and nothing in the hardware to stop you from stomping on another user
>if you do.  Therefore, the compiler and the operating system would be
>written so as to cause an interrupt if computing 'b - 1' were attempted.

>Note that there is no C compiler for the A-series today, although one is
>rumored.
This seems logically inconsistent. You say that on the Unisys A-series
that the problem is in the compiler. But then you say there is no
C compiler. If the problem exists in other language compilers,
simply leave it out of C! Simply write the compiler so that it doesn't
check pointers. (If it did do that, wouldn't it be a horrendous time
penalty? Every time you said "pointer++" it would have to check
bounds, unless the pointer were declared the non-existant "noalias".)

What about assembly language? What is to stop things from 
happening there with out of bounds pointers?

Doug McDonald



More information about the Comp.lang.c mailing list