MISRA C:2012 Rule 3.1
The character sequences /*
and //
shall
not be used within a comment
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.
Additional Message in Report
The character sequence /*
shall not appear
within a comment.
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 R2014b