AutosarC++18_10-A5.2.2

Traditional C-style casts shall not be used

Required inputs: IR

C++-style casts (static_cast, dynamic_cast, const_cast and reinterpret_cast) make the intended semantics of the cast clear to readers of the code.

Possible Messages

Key

Text

Severity

Disabled

c_cast

Use of C-style cast in C++ unit.

None

False

Options

allow_void_cast

allow_void_cast : bool = False

If True, (void) is always allowed, else only for return value of calls.
 

allow_void_cast_on_call

allow_void_cast_on_call : bool = False

If True, (void) is allowed, for return value of calls.