AutosarC++18_03-A18.0.1ΒΆ
The C library facilities shall only be accessed through C++ library headers
Required inputs: IR
| Level | required |
|---|---|
| Target | implementation |
| Enforcement | automated |
Rationale
C libraries (e.g. <stdio.h>) also have corresponding C++ libraries (e.g. <cstdio>). This rule requires that the C++ version is used.
See Also
- MISRA C++ 2008 [6]: Rule 18-0-1 (Required) The C library shall not be used.
- HIC++ v4.0 [8]: 1.3.3 Do not use the C Standard Library .h headers.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
c_lib_header |
Include <{}> instead of <{}>. |
None |
False |
cpp_lib_header_with_suffix |
Include <{}> instead of <{}>. |
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
This rule has no individual options.