Re: [ooc-compiler] Unsafe pointers on the stack
Brought to you by:
mva
|
From: Isaac G. <ig...@ya...> - 2005-05-26 01:04:59
|
--- August Karlstrom <fus...@co...> wrote: > If I compile and run the following program I get a segmentation fault > rather that a run time exception. > > MODULE Test; > PROCEDURE P; > VAR p: POINTER TO ARRAY OF LONGINT; > BEGIN > p[0] := 1 > END P; > BEGIN > P > END Test. > > So in this regard the above program compiled with OOC is just as > unsafe as a C program. Wasn't the elimination of wild pointers one of > the design criteria of Oberon? fyi XDS Oberon-2 gives 2 compile-time warnings 5:7 possibly used before definition "p" 5:8 NIL dereference __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ |