Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: NULL pointer not generating exception

Reply
Thread Tools

Re: NULL pointer not generating exception

 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      08-26-2003
On 25 Aug 2003 23:42:16 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Boris Rogge) wrote:

>Problem:
>When calling a function on an object that is not allocated, no
>null-pointer exception is generated.


Anything or nothing can happen, since it's undefined behavior.

Whatever happens (e.g. the harddisk spinning so as to reproduce
the wailing from "Mars Attacks!") it's allowed by the standard.

Simply don't call member functions via null-pointers.

 
Reply With Quote
 
 
 
 
Kevin Goodsell
Guest
Posts: n/a
 
      08-26-2003
Ron Natalie wrote:

> "Alf P. Steinbach" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>
>
>>Whatever happens (e.g. the harddisk spinning so as to reproduce
>>the wailing from "Mars Attacks!") it's allowed by the standard.
>>

>
> Fire and brimstone coming down from the skies. Rivers and seas boiling! 40 years of darkness, earthquakes, volcanos.
> The dead rising from the grave! Human sacrifice, dogs and cats, living together... mass hysteria!
>
>


....

I love you.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      08-26-2003
Kevin Goodsell wrote:
> Ron Natalie wrote:
>
>> "Alf P. Steinbach" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>
>>
>>> Whatever happens (e.g. the harddisk spinning so as to reproduce
>>> the wailing from "Mars Attacks!") it's allowed by the standard.
>>>

>>
>> Fire and brimstone coming down from the skies. Rivers and seas
>> boiling! 40 years of darkness, earthquakes, volcanos.
>> The dead rising from the grave! Human sacrifice, dogs and cats,
>> living together... mass hysteria!

...
>
> I love you.
>


Love fests are off topic.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pointer to pointer intialize to NULL but still point to NULL Christopher C++ 4 07-09-2011 12:35 AM
Null pointer (NULL array pointer is passed) aneuryzma C++ 3 06-16-2008 05:48 AM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
NULL macro vs. 0 as null pointer? Ken C++ 69 07-31-2004 04:45 AM
Re: NULL pointer not generating exception Samuel Barber C++ 2 08-28-2003 03:34 AM



Advertisments