Exception without rtti.

Alexander V. Komarov sasha@mera.ru
Wed Dec 29 05:10:00 GMT 1999


Hello!

I'm trying to run exception test from testsuit (actually I'm trying to
make exceptions work on uClinux on m68k DragonBall processor),

g++ -Wl,-M -fno-rtti -fsjlj-exceptions eh8.C -o eh8
./eh8
/* Long linker output ;-) */
Catch
Segmentation fault (core dumped)

eh8.C :
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*

extern "C" int printf(const char *, ...);

int i;

main() {
  try {
    try {
      throw i;
    } catch (char *) {
      return 1;
    }
    return 1;
  } catch (int i) {
printf("Catch\n");
    return 0;
  }
  return 1;
}

in my case (on DragonBall, it even does not print "Catch")

Sincerely Yours, Alexander Komarov.



More information about the Gcc-bugs mailing list