Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Jonathan Wakely
to check this in to trunk? From: Jonathan Wakely jwakely@gmail.com To: Segher Boessenkool seg...@kernel.crashing.org Cc: james_av...@yahoo.com; gcc@gcc.gnu.org Sent: Tuesday, December 20, 2011 5:22 AM Subject: Re: Possible wrong-way example in gcc4-4-2

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Jonathan Wakely
...@kernel.crashing.org Cc: james_av...@yahoo.com; gcc@gcc.gnu.org Sent: Tuesday, December 20, 2011 5:22 AM Subject: Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect On 20 December 2011 12:49, Segher Boessenkool wrote: The point of the example is that you cannot write

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Ian Lance Taylor
Jonathan Wakely jwakely@gmail.com writes: In order to follow the GCC coding style (a space between the function name and opening parenthesis) and to match the first example for __builtin_expect, I propose this patch instead: Index: extend.texi

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Jonathan Wakely
to check this in to trunk? From: Jonathan Wakely jwakely@gmail.com To: Segher Boessenkool seg...@kernel.crashing.org Cc: james_av...@yahoo.com; g...@gcc.gnu.org Sent: Tuesday, December 20, 2011 5:22 AM Subject: Re: Possible wrong-way example in gcc4-4-2

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Jonathan Wakely
...@kernel.crashing.org Cc: james_av...@yahoo.com; g...@gcc.gnu.org Sent: Tuesday, December 20, 2011 5:22 AM Subject: Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect On 20 December 2011 12:49, Segher Boessenkool wrote: The point of the example is that you cannot write

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-21 Thread Ian Lance Taylor
Jonathan Wakely jwakely@gmail.com writes: In order to follow the GCC coding style (a space between the function name and opening parenthesis) and to match the first example for __builtin_expect, I propose this patch instead: Index: extend.texi

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Segher Boessenkool
The online docs at http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Other-Builtins.html has a confusing (to me) example of __builtin_expect. Could someone take a look at this? start quote from above-referenced page Since you are limited to integral expressions for exp, you should use

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Jonathan Wakely
On 20 December 2011 12:49, Segher Boessenkool wrote: The point of the example is that you cannot write          if (__builtin_expect (ptr, 1))            error (); so the != NULL is important here.  But you are right that error () is a bit unexpected; care to send a patch that changes it

Re: Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-20 Thread Jim Avera
();  @end smallexample    @noindent From: Jonathan Wakely jwakely@gmail.com To: Segher Boessenkool seg...@kernel.crashing.org Cc: james_av...@yahoo.com; gcc@gcc.gnu.org Sent: Tuesday, December 20, 2011 5:22 AM Subject: Re: Possible wrong-way example in gcc4-4-2

Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect

2011-12-19 Thread Jim Avera
Hello, The online docs at http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Other-Builtins.html has a confusing (to me) example of __builtin_expect. Could someone take a look at this? start quote from above-referenced page Since you are limited to integral expressions for exp, you should use