I compiled the following code on clang (trunk) + libc++
with -fno-rtti compiler option:
int main (int argc, char* argv)
bool x = (typeid(int) == typeid(int)); // Segmentation fault
Then, I got segmentation fault at `bool x = (typeid(int) == typeid(int));`.
So I checked `&typeid(int)`, and it turned out to be a null pointer.
I suspect that, with -fno-rtti compiler option, `typeid(int)` becomes
something like `*static_cast<type_info*>(0)`.
If so, shouldn't we disable `typeid` operator when -fno-rtti is specified?
The current behavior of `typeid` with -fno-rtti option is useless.
(c.f. On gcc, the use of `typeid` requires RTTI.)