Re: NULL pointer not generating exception

Discussion in 'C++' started by Alf P. Steinbach, Aug 26, 2003.

  1. On 25 Aug 2003 23:42:16 -0700, (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.
    Alf P. Steinbach, Aug 26, 2003
    #1
    1. Advertising

  2. Ron Natalie wrote:

    > "Alf P. Steinbach" <> wrote in message news:...
    >
    >
    >>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.
    Kevin Goodsell, Aug 26, 2003
    #2
    1. Advertising

  3. Kevin Goodsell wrote:
    > Ron Natalie wrote:
    >
    >> "Alf P. Steinbach" <> wrote in message
    >> news:...
    >>
    >>
    >>> 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.
    Gianni Mariani, Aug 26, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    26,481
    Mike Schilling
    Mar 29, 2006
  2. Samuel Barber
    Replies:
    2
    Views:
    407
    Jack Klein
    Aug 28, 2003
  3. Ken
    Replies:
    69
    Views:
    12,468
    Michael D. Borghardt
    Jul 31, 2004
  4. aneuryzma
    Replies:
    3
    Views:
    690
    Jim Langston
    Jun 16, 2008
  5. Christopher
    Replies:
    4
    Views:
    425
    Ruben Safir
    Jul 9, 2011
Loading...

Share This Page