This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: new __builtin_choose_type (patch)


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.

Usage examples:

__builtin_equal_types(x, y) ? no() : x = 10;
if(__builtin_equal_types(x, y))
  {
  }
else
  {
  }

The part i react most against is that it implements a new code path
selection mechanism that is unlike all previously seen in C.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]