From: sparhawk AT eunet DOT at (Gerhard Gruber) Newsgroups: comp.os.msdos.djgpp Subject: Re: Null-Pointer and Assembly Date: Fri, 15 May 1998 15:46:43 GMT Organization: Customer of EUnet Austria Lines: 39 Message-ID: <35646198.3915502@news.Austria.EU.net> References: <19980515020310 DOT AAF15760 AT ppp123 DOT cartsys DOT com> NNTP-Posting-Host: e146.dynamic.vienna.at.eu.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Destination: Nate Eldredge From: Gruber Gerhard Group: comp.os.msdos.djgpp Date: Thu, 14 May 1998 19:03:21 -0700: >At 07:02 5/14/1998 -0400, John M. Aldrich wrote: >>Gerhard Gruber wrote: >>> >>> That's not exactly true. If you use the MFC (recommended by MS) then you get >>> hundreds of codelines calling assert() to ensure that there is no null >>> pointer. >>> >>> I can't believe it! I just wrote a mail that defends MS. Must getting sick or >>> the heat affects my brain. :) >> >>I guess that post must have been tongue-in-cheek. After all, *0 is a >>NULL-pointer dereference and all the asserts in the world won't catch >>it. :-) However, cwsdpmi bombs on it while Windows just keeps on >>truckin'... > >But probably he means that with Mircosoft MFC, `*0' expands to: Not exactly. When you use the classes then most pointers within that classes are checked before the class accesses them. >assert(0); >*0; > >How inspired. :) -- Bye, Gerhard email: sparhawk AT eunet DOT at g DOT gruber AT sis DOT co DOT at Spelling corrections are appreciated.