This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Documentation bug for __builtin_choose_expr
Andreas Schwab wrote:
Jamie Lokier <jamie@shareable.org> writes:
This built-in function is analogous to the `? :' operator in C,
except that the expression returned has its type unaltered by
promotion rules. Unlike most built-in functions, but like the
`? :' operator, this built-in function does not evaluate the
expression that was not chosen. For example, if CONST_EXP
evaluates to true, EXP2 is not evaluated even if it has
side-effects.
IMHO, "but like the `? :' operator" could be removed without any negative
impact (anyone who doesn't know how the ?: operator should not look at
builtins either :-) ).
Why remove it? It only makes things clearer ... Documentation is about
making things clear, we are not writing a language standard here, where
redundancy is to be avoided. Perhaps it would make things clearer to put
this parenthetical remark in parentheses
Andreas.
>> This built-in function is analogous to the `? :' operator in C,
>> except that the expression returned has its type unaltered by
>> promotion rules. Unlike most built-in functions (but like the
>> `? :' operator), this built-in function does not evaluate the
>> expression that was not chosen. For example, if CONST_EXP
>> evaluates to true, EXP2 is not evaluated even if it has
>> side-effects.