This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] Typo in description of __builtin_expect_with_probability
On 2018-10-30 09:29, Martin Liška wrote:
> On 10/30/18 3:56 AM, Alexander Oblovatniy wrote:
>> Hello,
>>
>> I'd like to report a typo in description of
>> «__builtin_expect_with_probability»:
>> https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins
>>
>> The description starts with "The built-in has same semantics as
>> *__builtin_expect_with_probability*", but it seems like *__builtin_expect*
>> should be there.
>
> Thanks for reporting the issue. It's fixed as r265615.
Other issues around the same place: "expected probability (in percent)"
seems to contradict "valid values are in inclusive range 0.0f and 1.0f".
The prototype is listed as
(long exp, long c, long probability)
contradicting the prose "Last argument probability is of float type".
So, should probability be an integer in [0, 100], or a float in [0, 1]?
Rasmus