C and C++


LANG.COMM.NEST.CPPSTYLE : // in Comment

Summary

The string // occurs within the body of a /*...*/ comment.

Properties

Class Name // in Comment
Significance style
Mnemonic LANG.COMM.NEST.CPPSTYLE
Categories
MisraC2023 MisraC2023:3.1 The character sequences /* and // shall not be used within a comment
Misra2012 Misra2012:3.1 The character sequences /* and // shall not be used within a comment
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="// in Comment"

Example

/* following line ok: C++ style comment not nested inside a C-style comment */
// this comment // is ok 

    /* LANG.COMM.NEST.CPPSTYLE warning issued on following line */
/* this comment // is not ok */

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.