>> Hmm, given Bruno's recent point that C89 didn't require ?: support
>> in constant expressions

I'm skeptical of that.  I can't find my copy of the official C89 standard,
but the draft <http://flash-gordon.me.uk/ansi.c.txt> says that
constant expressions can contain ?:.  In fact, the grammar in
section 3.4 looks like this:

         constant-expression:
                  conditional-expression

and until this discussion I've never heard of the claim that
one cannot use ?: in constant expressions.

Given that (X ? 1 : -1) captures the concept more clearly than
(2 * X - 1), we're better off using the former notation than
the latter.

Reply via email to