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

--- Comment #2 from Pascal Cuoq <pascal_cuoq at hotmail dot com> ---
Richard:

>  I don't see how a volatile compound literal could make any sense or how 
> you'd observe the side-effect of multiple stores to it

Well, I have the same question about volatile variables the address of which is
not taken. But this is off-topic for this bug report, in which the volatile's
object's address is taken.

> (IIRC compound literals are constant!?).

The C11 standard invites the programmer to use the const qualifier if they want
a constant compound literal, and gives an explicit example of a “modifiable”
non-const compound literal: https://port70.net/~nsz/c/c11/n1570.html#6.5.2.5p12

Reply via email to