G
glen herrmannsfeldt
Keith Thompson said:It's a weak suggestion at best:
Each complex type has the same representation and alignment
requirements as an array type containing exactly two elements
of the corresponding real type; the first element is equal to
the real part, and the second element to the imaginary part,
of the complex number.
I suppose, but in the case of SSE it makes some sense. That is,
you might want to process an array multiple elements at a time,
and that is easier, on some machines, if aligned on a larger
boundary.
Also, for larger arrays you might want them page aligned, where
that would be rare for scalars.
The fact that it refers to the alignment requirements of the array
type, rather than of the element type, *might* suggest that they
could differ, but I think it was just easier to word it that way.
6.5.3.4p3 (already quoted in this thread) explicitly says they're
the same.
Which I suspect is what you meant, but I wasn't sure.
-- glen