S
shishir
Please consider the following
//file test.cpp
#include <iostream>
int main()
{
int x;
try
{
throw x;
}
catch(int x)
{
cout << "Caught\n ";
}
}
This program works fine when compiled with
g++ test.cpp
but when compile with
g++ -fno-rtti test.cpp, it crashes .
What could be the reason ? Is it that one can't one disable the rtti
option in isolation, i.e. fexception too has to be disabled ?
//file test.cpp
#include <iostream>
int main()
{
int x;
try
{
throw x;
}
catch(int x)
{
cout << "Caught\n ";
}
}
This program works fine when compiled with
g++ test.cpp
but when compile with
g++ -fno-rtti test.cpp, it crashes .
What could be the reason ? Is it that one can't one disable the rtti
option in isolation, i.e. fexception too has to be disabled ?