On 2018-10-30 10:54, Jonathan Wakely wrote: > On Tue, 30 Oct 2018 at 09:18, Rasmus Villemoes <r...@rasmusvillemoes.dk> > wrote: >> >> 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) > > The testcases added alongside the new built-in use float arguments, > but the actual definition of the built-in seems to use a long double.
In DEF_FUNCTION_TYPE_3 (BT_FN_LONG_LONG_LONG_DOUBLE, BT_LONG, BT_LONG, BT_LONG, BT_DOUBLE) doesn't the first LONG refer to the return type, so that the third argument just has type double? Other than that, your suggested update makes sense (provided it actually matches the implementation, which I can't verify).