Where multiple declarators appear in the same declaration the type of an identifier may not meet developer expectations.

== Noncompliant Code Example

----
int i1; int j1; // Compliant, but not preferred
int i2, *j2; // Noncompliant
int *i3,                  
    &j3 = i2; // Noncompliant
----

== Compliant Solution

----
int i1; 
int j1;
int i2;
int *j2;
int *i3;
int &j3 = i2;
----

== See

* MISRA {cpp}:2008, 8-0-1 - An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively
* https://wiki.sei.cmu.edu/confluence/x/YTZGBQ[CERT, DCL52-J.] - Do not declare more than one variable per declaration
* https://wiki.sei.cmu.edu/confluence/x/EtcxBQ[CERT, DCL04-C.] - Do not declare more than one variable per declaration
* https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#es10-declare-one-name-only-per-declaration[{cpp} Core Guidelines - ES.10] - Declare one name (only) per declaration

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
