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