[cfe-dev] Address of vector component legal?

Chris Lattner clattner at apple.com
Tue Feb 26 15:34:38 PST 2008


On Jan 19, 2008, at 10:18 AM, Eli Friedman wrote:

> Testcase:
> void a() {
> typedef float v4sf __attribute__ ((vector_size (16)));
> static v4sf q;
> float* r = &q[0];
> }
>
> Testcase currently crashes clang -emit-llvm. Is the fact that this
> doesn't currently work just an oversight?  Or is it not supposed to be
> allowed?

We should reject this in sema, just like taking the address of a  
bitfield.

-Chris



More information about the cfe-dev mailing list