[cfe-dev] vector constructors

Douglas Gregor dgregor at apple.com
Tue Mar 16 14:06:22 PDT 2010


On Mar 16, 2010, at 2:00 PM, Jochen Wilhelmy wrote:

> 
>> This works for me:
>> 
>> $ cat t.c
>> void foo() {
>>  vector float x;
>>  x = (vector float)(1,2,3,4);
>> }
>> $ clang -cc1 t.c -fsyntax-only -faltivec
>> 
>> 
>> 
> Yes I know that this works. It's the c-like extension of the
> cast operator to vectors, but in contrast I'd like to have
> a c++-like extension of the function style cast:
> 
> int(1)
> int4(1, 2, 3, 4)

Do other compilers support this syntax? (e.g., GCC)?

	- Doug



More information about the cfe-dev mailing list