AutosarC++17_03-A2.14.3¶
Type wchar_t shall not be used
Required inputs: IR
| Level | required |
|---|---|
| Target | implementation |
| Enforcement | automated |
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¶
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
forbidden_types¶
forbidden_types : set[bauhaus.ir.LIR_Class_Name] = {'CPP_WChar_Type'}
C_Long_Double_Type.