TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  POR#030

Synopsis:Both operands of the remainder operator shall be positive
Language:C++
Severity Level:5
Category:Portability


Description:

Please note that a % b is implementation-defined for negative a or b, and undefined for b == 0. Also note that automatic verification of this rule is often impractical in case of signed types.