AutosarC++18_10-A2.13.3

Type wchar_t shall not be used

Required inputs: IR

Rationale

Width of wchar_t type is implementation-defined.

Types char16_t and char32_t should be used instead.

Example
//% $Id: A2-13-3.cpp 305629 2018-01-29 13:29:25Z piotr.serwa $
    char16_t string1[] = u"ABC"; // Compliant
    char32_t string2[] = U"DEF"; // Compliant
    wchar_t string3[] = L"GHI";   // Non-compliant
See Also
  • none

Possible Messages

Key

Text

Severity

Disabled

type_used

The type shall not be used.

None

False

Options

forbidden_types

forbidden_types : set[bauhaus.ir.LIR_Class_Name] = {'CPP_WChar_Type'}

The ir.Logical Types not to be used e.g. C_Long_Double_Type.