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

SR:  6.2#1Checked automatically with code checker

Synopsis:Since conversion between signed and unsigned integral types involves implementation defined behaviour, signed and unsigned data items shall not be mixed within the same expression.
Language:C
Severity Level:1
Category:CONVERSIONS


Description:

Although nearly all implementations will behave the same when converting to signed types, maximum portability requires that all implementation defined behaviour is avoided. See also the discussion in section 1.8.

Example:

int a;
unsigned int c;
a = c; /* WRONG */