I write a source file test.cpp as below:
Code: Select all
void main()
{
int i;
try{
i=0;
i=i/i;
}catch(int e){
i=1;
}
}
g++ test.cpp -c -o test.o
ld test.o -o test.exe
But I'm amazing that I could not find any dissamble code about exceptions. I'm wondering whether g++ will disable exceptions if there's no stdlib included in.
By the way, adding the -fexceptions flag is no use.