[cfe-dev] some newbie questions

Jochen Wilhelmy j.wilhelmy at arcor.de
Tue Oct 13 10:19:50 PDT 2009


Hi!

I hope this is the right way to ask some newbie-questions about clang.

1. which option (clang::LangOptions) controls the overloading feature?
(e.g. int foo(int x); int foo(float x);)
is it possible to create a c-compiler with just overloading enabled 
additionally?

2. do I have to typedef vector types myself also in x=cl mode?
(e.g. typedef __attribute__(( ext_vector_type(4) )) float float4;)

3. how to I create a vector type in a expression? I want to write
a = b * float4(1, 2, 3, 4);
I get error: function-style cast to a builtin type can only take one 
argument.
Where can I patch this and would a patch be welcome or has it some
reason that it does not work?

4. how can I control the size of the builtin types (int, long etc.)?
I want to set long to 64 bit independent of the target architecture.


thanks and with kind regards,
jochen



More information about the cfe-dev mailing list