This is the mail archive of the
mailing list for the GCC project.
Re: new __builtin_choose_type (patch)
On Wed, 2001-10-03 at 04:15, Magnus Fromreide wrote:
> It is my feeling that it would be more general and cleaner to do something
> along the lines of
> _Bool __builtin_equal_types(arg|type, arg|type)
> that doesn't evaluate the arguments if they are expressions and answers
> the question of wether they are of the same type.
yeah, but i was hoping the calculations could all be done before code
> Usage examples:
> __builtin_equal_types(x, y) ? no() : x = 10;
> if(__builtin_equal_types(x, y))
then we'd have to generate:
whereas with my approach, you wouldn't even have to generate a compare.
> The part i react most against is that it implements a new code path
> selection mechanism that is unlike all previously seen in C.
but your approach sounds much simpler though. i'm going to add some new
functionality to builtins to get my stuff to work.
patch later today...
Aldy Hernandez E-mail: firstname.lastname@example.org
Professional Gypsy on a Motorcycle
Red Hat, Inc.