Main Content
MISRA C:2023 Rule 3.1
Description
Rule Definition
The character sequences /*
and //
shall
not be used within a comment.
Rationale
These character sequences are not allowed in code comments because:
If your code contains a
/*
or a//
in a/* */
comment, it typically means that you have inadvertently commented out code.If your code contains a
/*
in a//
comment, it typically means that you have inadvertently uncommented a/* */
comment.
Polyspace Implementation
You cannot annotate this rule in the source code.
For information on annotations, see Annotate Code and Hide Known or Acceptable Results.
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: Comments |
Category: Required |
AGC Category: Required |
Version History
Introduced in R2024a