AutosarC++19_03-A5.2.3

A cast shall not remove any const or volatile qualification from the type of a pointer or reference

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

cast_removes_atomic

Cast removes _Atomic qualification

None

False

cast_removes_const

Cast removes const qualification

None

False

cast_removes_volatile

Cast removes volatile qualification

None

False

implicit_cast_removes_atomic

Implicit cast removes _Atomic qualification

None

False

implicit_cast_removes_const

Implicit cast removes const qualification

None

False

implicit_cast_removes_volatile

Implicit cast removes volatile qualification

None

False

Options

check_atomic

check_atomic : bool = False

Whether casts affecting _Atomic-qualifiers should be reported
 

check_const

check_const : bool = True

Whether casts affecting const-qualifiers should be reported.
 

check_volatile

check_volatile : bool = True

Whether casts affecting volatile-qualifiers should be reported.
 

only_top_level

only_top_level : bool = False

Whether the check only applies to the top-level pointee or recursively to deeper pointer levels as well.