cppreference says:
An identifier that names a variable, a function, specialization of a concept, (since C++20) or an enumerator can be used as an expression. The result of an expression consisting of just the identifier is the entity named by the identifier. [...] The type of the expression is determined as follows:
[...] Otherwise, the type of the expression is the same as the type of the entity named.
Isn't it a bug? If the entity is a reference, like:
int &a = ...
Then a's type as an entity is int &, but a's type as an expression is only int, isn't it? An expression's type is never a reference:
[...] Each expression has some non-reference type
Bonus question: does it matter, whether a's type (as an expression) is int or int &? If yes, where does it make a difference?
Note: the same wording is used at decltype:
If the argument is an unparenthesized id-expression or an unparenthesized class member access expression, then decltype yields the type of the entity named by this expression.
But clearly, decltype(a) is int &.