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

2011-12-21 Thread Ian Lance Taylor
Jonathan Wakely 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
rove example. > > > Can I get approval to check this in to trunk? > > > >> >> >> ________________ >> From: Jonathan Wakely >> To: Segher Boessenkool >> Cc: james_av...@yahoo.com; gcc@gcc.gnu.org >> Sent: Tuesday, Dec

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

2011-12-21 Thread Jonathan Wakely
example. Can I get approval to check this in to trunk? > > > > From: Jonathan Wakely > To: Segher Boessenkool > Cc: james_av...@yahoo.com; gcc@gcc.gnu.org > Sent: Tuesday, December 20, 2011 5:22 AM > Subject: Re: Possible wrong-way example

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

2011-12-20 Thread Jim Avera
ing();  @end smallexample    @noindent From: Jonathan Wakely To: Segher Boessenkool 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

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 c

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? Since you are limited to integral expressions for exp, you should use constructions such as if (__builtin_

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? Since you are limited to integral expressions for exp, you should use constructions such as if (__b