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

SR:  7.2#2Checked automatically with code checker

Synopsis:Constant expressions must not lead to division by zero.
Language:C
Severity Level:1
Category:EXPRESSIONS


Description:
Division by zero in any expression leads to undefined behaviour. In general, this is only statically detectable in constant expressions.

Example:

#define INFINITY 1/0 int big_array[INFINITY];