Main Content
MISRA C++:2023 Rule 5.13.3
Description
Rule Definition
Octal constants shall not be used.
Rationale
Octal constants are denoted by a leading zero. You can confuse an octal constant as a decimal constant with a redundant leading zero.
Octal escape sequences beginning with \
are compliant.
Polyspace Implementation
The rule checker reports violations on constants beginning with a leading zero.
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 |
Version History
Introduced in R2024b