id summary reporter owner description type status milestone component version severity resolution keywords cc 13613 gcd performs modulo by zero which is undefined James E. King, III Daryle Walker "Boost.Rational uses Boost.Integer's gcd method. I Added Coverity Scan support to the Boost.Rational build and it identified an issue that needs investigation: CID 293013 (#4-12 of 12): Division or modulo by zero (DIVIDE_BY_ZERO) divide_by_zero: In function call gcd, modulo by expression 0 has undefined behavior. [hide details] (rational_test.cpp) 470 BOOST_CHECK_EQUAL( boost::gcd( 0, -9), static_cast( 9) ); (rational.hpp) IntType gcd(IntType n, IntType m) { // Defer to the version in Boost.Integer > 1. divide_arg: n is used as a divisor in function gcd. return integer::gcd( n, m ); } " Bugs new To Be Determined integer Boost 1.67.0 Problem ub