Date: Thu, 14 Nov 1996 17:25:19 +0200 (IST) From: Eli Zaretskii To: Cesar Scarpini Rabak Cc: Ole Winther , djgpp AT delorie DOT com Subject: Re: How assign to NULL POINTER In-Reply-To: <1.5.4.16.19961114132000.29cf1b84@dmeasc.rc.ipt.br> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 14 Nov 1996, Cesar Scarpini Rabak wrote: > > char *ptr; /* will be initialized to zero by the linker */ > > > > void myfunc(void) > > { > > char c = *ptr; /* this will crash your program under DJGPP */ > > } > > Eli, this code fragment compiled w/DJGPP (albeit replacing myfunc by main > straight) runs w/o problems! What is your DPMI host? If it's not CWSDPMI or 386Max, then you lose: all of the rest don't disallow null pointer dereference, but rather let you get away with it.