Home | History | Annotate | Download | only in jni
      1 // This file should FAIL to build iff exceptions are enabled and RTTI is disabled
      2 #ifndef __EXCEPTIONS
      3 int main(void) { return 0; }
      4 #else // !exceptions
      5 #include <typeinfo>
      6 #include <stdio.h>
      7 
      8 class Foo { int x; };
      9 
     10 int main(void) {
     11     printf("%p\n", typeid(Foo)); // will fail without -frtti
     12     return 0;
     13 }
     14 #endif
     15