This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help on gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]