This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Exception handling
- To: <gcc at gcc dot gnu dot org>
- Subject: Exception handling
- From: "Igor Mukhin" <imukhin at tot dot ru>
- Date: Wed, 19 Jan 2000 14:45:47 +0300
- Reply-To: "Igor Mukhin" <imukhin at tot dot ru>
Hello,
I need to implement exception handling mechanism in my C++ project. Here is
a simple code i wrote to test that:
#include <stdio.h>
int main()
{
int *pI;
pI = 0;
try {
int j = *pI;
}
catch(...)
{
printf("We are still working, core was not dumped.\n");
}
return 0;
}
I have installed gcc 2.95.2 and binutils 2.9.5.0.24. When this program is
executed I get segmentation fault at int j = *pI; line. Actually I failed to
"catch" any type exceptions generated in the try block. What is wrong?
Thanks in advance,
================================
Igor Mukhin
E-mail: imukhin@tot.ru
ICQ: 626446
================================