diff mbox series

Fix __builtin_expect_with_probability documentation

Message ID 20181030121722.GA21979@redhat.com
State New
Headers show
Series Fix __builtin_expect_with_probability documentation | expand

Commit Message

Jonathan Wakely Oct. 30, 2018, 12:17 p.m. UTC
* doc/extend.texi: Fix prototype and description of
	__builtin_expect_with_probability.

Committed to trunk, as discussed on the gcc list.
commit 9fb8a9f94f673e7dd12b3a625829db6caaeab99e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Oct 30 12:15:14 2018 +0000

    Fix __builtin_expect_with_probability documentation
    
            * doc/extend.texi: Fix prototype and description of
            __builtin_expect_with_probability.
diff mbox series

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 8772f3afe6b..4dbb2da39e4 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -12025,12 +12025,12 @@  when testing pointer or floating-point values.
 @end deftypefn
 
 @deftypefn {Built-in Function} long __builtin_expect_with_probability
-(long @var{exp}, long @var{c}, long @var{probability})
+(long @var{exp}, long @var{c}, double @var{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.
+This function has the same semantics as @code{__builtin_expect},
+but the caller provides the expected probability that @var{exp} == @var{c}.
+The last argument, @var{probability}, is a floating-point value in the
+range 0.0 to 1.0, inclusive.
 @end deftypefn
 
 @deftypefn {Built-in Function} void __builtin_trap (void)