I don't follow. The above is not C. It's a C++ extension over C declaration syntax in such a way that the & is part of the declarator just like * .
// Inexcusable trompe l'oeil:
int& a, b;
// OK;
int &a, &b;
Here, the mistake may be harder to catch, because the expressions
a and
b are both of type
int, either way.
// Intent: b is an alias of a.
// Reality: b is a new variable, holding copy of x.
int& a = x, b = a;
I think what you mean is that the "declaration follows use" principle falls apart for C++ references.
That is necessarily true because no operator is required at all to use a C++ reference, whereas the explicit & type construction operator is required in the declarator syntax to denote it.
However, it has little to do with the issue that & is part of the declarator and not of the type specifiers.
Declaration follows use also falls apart for function pointers in C, because while int (* pf)(int) can be used as result = (* pf)(arg), it is usually just used as result = pf(arg).
Declaration follows use also falls apart for the -> notation. A pointer ptr is always being used as ptr->memb, but declared as struct foo *ptr which looks nothing like it.
And of course, arrays can be used via pointer syntax, and pointers via array syntax, also breaking declaration follows use.
Declaration follows use is only a weak principle used to help newbies get over some hurdles in C declaration syntax.