Smells like UB. Is this defined in the standard?
> 6. The value of the compound literal is that of an unnamed object initialized by the initializer list. If the compound literal occurs outside the body of a function, the object has static storage duration; otherwise, it has automatic storage duration associated with the enclosing block.
it's valid until the end of the block. so, if the function returns the pointer, you can even use that until the end of the block
there's actually an example in the spec, on that page:
> drawline(&(struct point){.x=1, .y=1}, &(struct point){.x=3, .y=4});