On 08.10.2024 17:38, Sandra Loosemore wrote: > On 10/8/24 09:35, Jan Beulich wrote: >> On 08.10.2024 17:30, Sandra Loosemore wrote: >>> [snip] >>> >>> Hmmm, looking at the complete documentation for this built-in, and the >>> code, I think I'd go a little farther with fixing up the docs. >>> >>> Since requiring the first operand to be a constant is also different >>> behavior than the ?: operator, it's misleading to state only the return >>> type as being different. So I'd rewrite the whole paragraph quoted above: >>> >>> Like the @samp{? :} operator, the built-in function does not evaluate >>> the expression that is not chosen. For example, if @var{const_exp} >>> evaluates >>> to @code{true}, @var{exp2} is not evaluated even if it has side effects. >>> On the other hand, @code{__builtin_choose_expr} differs from @samp{? :} >>> in that the first operand must be a compile-time constant, and the other >>> operands are not subject to the @samp{? :} type constraints and promotions. >> >> Fine with me; I assume you will then simply put in your version of the >> change? > > I'm actually not in a good position to do that anytime soon (I'm both > sick with COVID and in the middle of hacking on something else), so if > you could push the change I'd be grateful.
Done. Jan