This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help on gcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "James Dressler" <jamesmdr at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 05 Feb 2002 19:10:26 -0200
- Subject: Re: Help on gcc
- Organization: GCC Team, Red Hat
- References: <LAW2-F54JUVyawFTZkz0001a681@hotmail.com>
On Feb 5, 2002, "James Dressler" <jamesmdr@hotmail.com> wrote:
> does not work, never prints "captured"
Dereferencing a NULL pointer invokes undefined behavior, so the crash
you get is in perfect accordance with the Standard, and it is indeed
the expected behavior. In fact, be happy that the program didn't
format your hard disk, destroy the universe nor go out with your
sister :-) It might throw an exception, but that's not what most would
expect from C++ programs in this situation. C++ != Java :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer