I'm trying to port the following Visual C++ code to GCC:
typedef __declspec(align(16)) float float4;
This defines a new type, float4, which is an array of four floats, aligned on 16 bytes. GCC has an __align(16) specifier, which is almost equivalent to __declspec(align(16)), but it is not allowed in typedefs for some reason. I tried creating an aligned float4 struct type, but oddly this doesn't compile either. I'd really love to be able to use float4 directly everywhere I need an aligned vector.