The language explicitly prohibits this
6.5.2.5 Compound literals
Constraints
1 The type name shall specify an object type or an array of unknown size, but not a variable length array type.
If you need something like this, you'd have to use a named VLA object instead of compund literal. However, note that VLA types do not accept initializers, meaning that you can't do this
char buf[len] = { 0 }; // ERROR for non-constant `len`
(I have no idea what the rationale behind this restriction is.)
So, in addition to using a named VLA object you'll have to come up with some way to zero it out, like a memset
or an explicit cycle.