[cfe-dev] vector constructors

Jochen Wilhelmy j.wilhelmy at arcor.de
Tue Mar 16 12:05:10 PDT 2010


Hi!


> This is already supported with -faltivec, you can enable the LangOptions flag to get this.
>    
Unfortunately I didn't get it to work.
I have langOptions.AltiVec = 1; and I tried
typedef __vector float float4;
and
typedef float __attribute__((ext_vector_type(4))) float4;

I get this error:

testc.cpp:51:23:{51:14-51:33}: error: function-style cast to a builtin 
type can
       only take one argument
          float4 b = float4(1, 2, 3, 4);

- Jochen




More information about the cfe-dev mailing list