https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69202

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There are two different things:
compounded literals: (type){expression}
Expression statements: ({expression;})

They both have a value associated with them.  compounded literal is a lvalue
while an expression statement is rvalue.

That is:
t = (pmd_t) { val };

is like having:
pmd_t anonymous = { val } ;
t = anonymous;

t = ({expression;}) is like having:
type anonymous;
do {
  expressions;
  anonymous = last_expression;
}
t = (type)anonymous;

Note the cast causes the lvalue to become an rvalue.

Reply via email to