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