It is clearly defined:
8. Declarators: [dcl.decl]
3) Each initialization declarator in the declaration is analyzed separately, as if it were in the declaration on its own.
And note:
90) A declaration with several declarators is usually equivalent to the corresponding sequence of declarations, each with one descriptor. it
T D1, D2, ... Dn;
usually equivalent
T D1; T D2; ... T Dn;
where T is the decl-seq specifier, and each Di is an INIT descriptor.
For completeness (because the note is usually written):
An exception occurs when the name entered by one of the declarators hides the type name used by dcl specifiers, so when the same dcl specifiers are used in the subsequent declaration, they do not have the same meaning as in struct S { ... }; SS, T; struct S { ... }; SS, T; // declare two instances struct S which is not equivalent to struct S {...}; SS ST; // error`
source share