From: "A.Appleyard" To: DJGPP AT sun DOT soe DOT clarkson DOT edu Date: Thu, 9 Nov 1995 12:26:20 GMT Subject: FInding when an address is illegal Sometimes I get `illegal address' or similar fails. Often it has happened when I inadvertantly tried (in Gnu C++) to access quantities at address zero. But when I ran these two short Gnu C++ programs:- main(){int*x=9999,y; y=*x;} main(){int*x=0,y; y=*x;} just now, they both ran through without faulting. Why? (1) What are the valid address ranges under Gnu C/C++ run under GO32? (2) What are the valid address ranges under Gnu C/C++ run under v2? (3) If the variable `p' contains a Gnu C/C++ pointer value, how can the program find whether it is a valid address WITHOUT causing an error exit?