Re: Linux 2.4.10-pre11 -- __builtin_expect

From: James Antill (james@and.org)
Date: Mon Oct 08 2001 - 01:17:33 EST


Richard Henderson <rth@twiddle.net> writes:

> On Thu, Sep 27, 2001 at 06:28:08PM +0200, Andreas Schwab wrote:
> > You're right, seems like __builtin_expect is really only defined for pure
> > boolean values.
>
> I think the documentation mentions the current deficiency in that area.
> It is _supposed_ to be defined for all integral and pointer types, but
> that is hard with the current built-in infrastructure in the C front end.

 The documentation in the info files doesn't suggest that, in fact it
says...

    Since you are limited to integral expressions for EXP, you should
    use constructions such as

          if (__builtin_expect (ptr != NULL, 1))
            error ();

     when testing pointer or floating-point values.

-- 
# James Antill -- james@and.org
:0:
* ^From: .*james@and\.org
/dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:17 EST