Possible wrong-way example in gcc4-4-2 documentation of __builtin_expect
Ian Lance Taylor
iant@google.com
Wed Dec 21 19:00:00 GMT 2011
Jonathan Wakely <jwakely.gcc@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
> ===================================================================
> --- extend.texi (revision 182452)
> +++ extend.texi (working copy)
> @@ -7932,7 +7932,7 @@ expressions for @var{exp}, you should us
>
> @smallexample
> if (__builtin_expect (ptr != NULL, 1))
> - error ();
> + ptr->foo ();
> @end smallexample
>
> @noindent
>
>
> I've CC'd the gcc-patches list, which is where patches should be sent
> for review, and included a ChangeLog entry:
>
> 2011-12-21 Jonathan Wakely <jwakely.gcc@gmail.com>
> Jim Avera <james_avera@yahoo.com>
>
> * doc/extend.texi (__builtin_expect): Improve example.
>
>
> Can I get approval to check this in to trunk?
This is fine, with or without your proposed change.
Thanks.
Ian
More information about the Gcc
mailing list