AUTOSAR C++14 Rule A2-13-1
Only those escape sequences that are defined in ISO/IEC 14882:2014 shall be used
Description
Rule Definition
Only those escape sequences that are defined in ISO/IEC 14882:2014 shall be used.
Rationale
Escape sequences are certain special characters represented in string and
character literals. They are written with a backslash (\
)
followed by a character.
The C++ Standard (ISO/IEC 14882:2003, Sec. 2.13.2) defines a list of escape sequences. See Escape Sequences. Use of escape sequences (backslash followed by character) outside that list leads to undefined behavior.
Troubleshooting
If you expect a rule violation but Polyspace® does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Lexical Conventions |
Category: Required, Automated |