CUDASecurity-EXP02

Do not rely on side effects in operands to sizeof, _Alignof, or _Generic

Required inputs: IR

Based on: CertC-EXP44

With excerpts from SEI CERT, Copyright (C) 1995-2021 Carnegie Mellon University. See 9.4 3rd-Party Licenses in the documentation for full details.

Possible Messages

Key

Text

Severity

Disabled

side_effect_in_alignof

Operand of “_Alignof” shall not contain side effects

None

False

side_effect_in_generic

Selector of “_Generic” shall not contain side effects

None

False

side_effect_in_sizeof

Operand of “sizeof” shall not contain side effects

None

False

Options

allow_in_macro_definition

allow_in_macro_definition : bool = False

Allow side effects, if the generic selection has been expanded from a macro.