You copied the Doc URL to your clipboard.

Integer division-by-zero errors in C code

Integer division-by-zero errors can be trapped and identified by re-implementing the appropriate C library helper functions.

The default behavior when division by zero occurs is that when the signal function is used, or __rt_raise() or __aeabi_idiv0() are re-implemented, __aeabi_idiv0() is called. Otherwise, the division function returns zero.

__aeabi_idiv0() raises SIGFPE with an additional argument, DIVBYZERO.

Was this page helpful? Yes No