I'm writing a C compiler (with llvm as back-end) for practice, and the rules is followed by the C11 standard §6.2.4.
When going through the "Storage durations of objects" part, one case confused me:
¶8 A non-lvalue expression with structure or union type, where the structure or union contains a member with array type (including, recursively, members of all contained structures and unions) refers to an object with automatic storage duration and temporary lifetime. Its lifetime begins when the expression is evaluated and its initial value is the value of the expression. Its lifetime ends when the evaluation of the containing full expression or full declarator ends. Any attempt to modify an object with temporary lifetime results in undefined behavior.
I cannot imagine what the situation this case talks about, especially the array member part(As both non-lvalues with temporary lifetime, does a struct with an array member has any differences with a normal non-lvalue?) can anyone give me a code example to illustrate this?