what does C/C++ handler SIGFPE?
问题 well, I have searched the articles about SIGFPE ,then I wrote a few tests but it's behavoir is strange. Then I have to post it here to ask for help. Is the GCC/G++ or ISO C++ clearly defined what happens if divide by zero? 1) I searched the article : Division by zero does not throw SIGFPE it sames the output is inf 2) If I rewrite it as the following: void signal_handler (int signo) { if(signo == SIGFPE) { std::cout << "Caught FPE\n"; } } int main (void) { signal(SIGFPE,(*signal_handler));