c - Is a literal always an expression? -
is literal expression?
if no, literals expressions , not?
for literals expressions:
is literal primary expression, since literal doesn't contain operator?
can literal either lvalue or non-lvalue? example,
- string literals lvalues,
- i not sure if compound literal literal, , if is, it lvalue?
- all other literals non-lvalues?
are literals except compound literals constant expressions?
conversely, constant expressions not literals?
in c standard terminology, literals string literals , compound literals. guess refer things 0
known constants, not literals.
if language grammar summary (annex of c11 standard) see definition of primary-expression includes constant, string-literal. postfix-expression includes primary-expression , compound literals.
the specification of lvalue-ness compound literals can found in compound literal section (6.7.9.), string literals.
constant expression defined section 6.6 , better read entire section attempt summary here. orthogonal concept of literals.
Comments
Post a Comment