Main Content
MISRA C:2012 Rule 7.1
Octal constants shall not be used
Description
Rule Definition
Octal constants shall not be used.
Rationale
Octal constants are denoted by a leading zero. Developers can mistake an octal constant as a decimal constant with a redundant leading zero.
Polyspace Implementation
If you use octal constants in a macro definition, the rule checker flags the issue even if the macro is not used.
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Literals and Constants |
Category: Required |
AGC Category: Advisory |
Version History
Introduced in R2014b