AutosarC++17_10-A2.14.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-14-3.cpp 266557 2017-02-07 13:08:19Z piotr.tanski $
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.