diff mbox series

[DOCS,OBVIOUS] Fix typo in documentation of __builtin_expect_with_probability.

Message ID e148c4a0-8c59-55d6-7b38-f4d8cc3f4535@suse.cz
State New
Headers show
Series [DOCS,OBVIOUS] Fix typo in documentation of __builtin_expect_with_probability. | expand

Commit Message

Martin Liška Oct. 30, 2018, 8:26 a.m. UTC
Hi.

I'm going to install one obvious documentation fix as reported here:
https://gcc.gnu.org/ml/gcc/2018-10/msg00252.html

Martin

gcc/ChangeLog:

2018-10-30  Martin Liska  <mliska@suse.cz>

	* doc/extend.texi: Fix typo in documentation
	of __builtin_expect_with_probability.
---
 gcc/doc/extend.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Monakov Oct. 30, 2018, 8:32 a.m. UTC | #1
On Tue, 30 Oct 2018, Martin Liška wrote:

> Hi.
> 
> I'm going to install one obvious documentation fix as reported here:
> https://gcc.gnu.org/ml/gcc/2018-10/msg00252.html
> 
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-10-30  Martin Liska  <mliska@suse.cz>
> 
> 	* doc/extend.texi: Fix typo in documentation
> 	of __builtin_expect_with_probability.

Can you also check and fix the description of the 'probability' argument? In the
prototype it's of integer type, in the description it's a float in range 0 to 1,
and in the intro sentence it's implied to be a percentage (so 0 to 100).

Thanks.
Alexander
diff mbox series

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 7aeb4fd4d27..8772f3afe6b 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -12027,7 +12027,7 @@  when testing pointer or floating-point values.
 @deftypefn {Built-in Function} long __builtin_expect_with_probability
 (long @var{exp}, long @var{c}, long @var{probability})
 
-The built-in has same semantics as @code{__builtin_expect_with_probability},
+The built-in has same semantics as @code{__builtin_expect},
 but user can provide expected probability (in percent) for value of @var{exp}.
 Last argument @var{probability} is of float type and valid values
 are in inclusive range 0.0f and 1.0f.