__builtin_generic
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Fri Apr 4 18:49:00 GMT 2003
"Kean Johnston" <jkj@sco.com> writes:
> I doubt I explained this propperly so consider this
> example:
>
> __builtin_generic (x, "ld:cosld;f:cosf;:cos");
>
> If 'x' is of type long double ("ld"), then cosld() will be
> called. If it is of type float ("f") then cosf() will be
> called. Otherwise, for any other type, simple cos() will be called.
Thhis should be doable with __builtin_types_compatible_p, which
already exists in recent gccs.
--
Falk
More information about the Gcc
mailing list