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

Category: CONVERSIONS

Synopsis:


Description:

Coding Rules

NameCheckedSynopsis
6#1 Checked automatically with code checker Make implicit conversions explicit.
6.2#1 Checked automatically with code checker 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.
6.2#2 Use unsigned only where necessary.
6.3#1 Checked automatically with code checker Values shall not be implicitly converted to a narrower type.
6.3#2 Checked automatically with code checker Floating values should not be converted to integral types except through use of standard library routines.
6.3#3 Checked automatically with code checker Conversion of integral values to floating types should be avoided since loss of precision can occur.
6.4#1 Checked automatically with code checker Mixed precision arithmetic should be avoided if possible.
6.5#1 Checked automatically with code checker Mixed type arithmetic should be avoided.
6.5#2 Checked automatically with code checker Array indices must be within bounds.
6.6#1 Checked automatically with code checker Pointer to and from integer conversions shall not be used.
6.9#1 Checked automatically with code checker Pointers must not be cast to have potentially stricter alignment.
6.9#2 Checked automatically with code checker Pointers should not be type cast in general.