Array as compound literal [duplicate]
This question already has an answer here: Why are compound literals in C modifiable 1 answer In C99 we can use compound literals as unnamed array. But are this literals constants like for example 100 , 'c' , 123.4f , etc. I noticed that I can do: ((int []) {1,2,3})[0] = 100; and, I have no compilation error and is guessable that the first element of that unnamed array is modified with 100. So it seems as array as compound literal are lvalue and not constant value. It is an lvalue, we can see this if we look at the draft C99 standard section 6.5.2.5 Compound literals it says ( emphasis mine ):