Path: utzoo!attcan!uunet!husc6!mailrus!uwmcsd1!uxc!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: "Numerical Recipes in C" is nonport Message-ID: <225800063@uxe.cso.uiuc.edu> Date: 5 Sep 88 14:17:00 GMT References: <5162@hoptoad.uucp> Lines: 25 Nf-ID: #R:hoptoad.uucp:5162:uxe.cso.uiuc.edu:225800063:000:1265 Nf-From: uxe.cso.uiuc.edu!mcdonald Sep 5 09:17:00 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