Division by zero does not throw SIGFPE

前端 未结 3 1029
醉话见心
醉话见心 2020-12-17 11:04

I have a small program performing floating-point division by zero, so I expect SIGFPE.

#include 
#include 
#include 

        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 11:23

    For floating point numbers you can change this behavior by setting up FPU control word. Take a look here

提交回复
热议问题