cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[SUGGESTION] Add runtime checks for C++ integer modulo by zero

Open Xeverous opened this issue 7 months ago • 1 comments

This is #1184 but for modulo... sounds like it was forgotten that you can not mod by zero either.

There is also a case of division and modulo of std::numeric_limits<T>::min() / -1 which is UB aswell. Not sure if you want to check it too - it requires to check both operands.

Xeverous avatar Jun 02 '25 12:06 Xeverous