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) (new builtin_equal_types patch)


On Wed, Oct 03, 2001 at 11:19:45PM -0400, Aldy Hernandez wrote:
> thought about it.  like it.  nice and clean.
> 
> is everyone ok with this approach?  it's pretty.  it's got
> documentation.  it's got a test case. :)

... but it could be prettier... I'd still like to push for a function
which takes types as arguments.  You can use something like:
 __builtin_equal_types (typeof(x), float)

Also, how does this function deal with qualifiers?  Is a const double
equivalent to a double?  How about volatile?  Is 'signed int' the same
as 'int'?

>From reading the patch, you're comparing modes, not types.  That needs
to be reflected in the documentation, and possibly in the name of the
function.  Saying two types are the 'same' without defining sameness
isn't going to be enough.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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