Re: Linux 2.4.10-pre11 -- __builtin_expect

From: James Antill (
Date: Mon Oct 08 2001 - 01:17:33 EST

Richard Henderson <> 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

    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 --
* ^From: .*james@and\.org
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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