rspec/rules/S2323/rule.adoc
2021-01-27 13:42:22 +01:00

22 lines
476 B
Plaintext

Line-splicing occurs when the \ character is immediately followed by a new-line character. If the source line containing a ``++//++`` comment ends with a '\', the next line becomes part of the comment. This may result in unintentional removal of code.
== Noncompliant Code Example
----
void f ( void )
{
int x = 0; // comment \
if (x)
{
++x; /* This is always executed */
}
}
----
== See
* MISRA C:2012, 3.2 - Line-splicing shall not be used in // comments