The memory layout is the ABI not the language spec.
The language spec for C constrains the memory layout of a struct. From 6.7.3.2.7 of the draft spec:
> a structure is a type consisting of a sequence of members, whose storage is allocated in an ordered sequence, (emphasis added)
As an example, C++'s std::array can be implemented as a struct containing a fixed-size C-style array. This can be passed-by-value. This means that returning a std::array can be more performant than returning a std::vector (which might be implemented as an int* that is reallocated when you add too many elements), because a std::array is returned on the stack while a std::vector is returned on the heap.
I was bit by this once when returning a std::unordered_map because I was doing a heap-allocation in a performance-critical section.