https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95424
huyubiao <h13958451065 at 163 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |h13958451065 at 163 dot com --- Comment #10 from huyubiao <h13958451065 at 163 dot com> --- When encountering an expression like 1/X where X is a variable (potentially zero), GCC cannot statically determine whether X is zero. Currently, aside from using -fnon-call-exceptions to disable optimizations, are there other ways to make GCC recognize and handle the zero-check for X? Could GCC provide better user diagnostics to highlight this risky pattern?