Miscellaneous-NoImplicitTypeConversion

Do not use implicit type conversions

Required inputs: IR

This rule will warn on every use of implicit type conversions.

C performs implicit type conversions in many places, e.g. numeric promotion whenever an operator is applied to a type smaller than int.

This makes it nearly impossible to avoid all implicit conversions, so this rule is not very useful. Consider using the MisraC2012 rules 10.* and MisraC2012 rules 11.* instead to prevent problematic implicit type conversions.

See Also
Rule Miscellaneous-NoPrecisionLoss

Possible Messages

Key

Text

Severity

Disabled

suspicious_implicit_conversion

Use of implicit type conversion.

None

False

Options

excluded_classes

excluded_classes : set[bauhaus.ir.LIR_Class_Name] = {'Unknown_Class_Type', 'Unknown_Type'}

Types which are ignored both as source and target type after stripping pointers, qualifiers and typedefs.