[cfe-dev] warning with conditional operator and printf, is this a bug ?

David Blaikie dblaikie at gmail.com
Fri Nov 4 16:26:48 PDT 2011


> 1) There is no a reason to do any arithmetic conversions to the
> second or third operand of the conditional operator in this case.
> So the result of both operands should be original type, which is
> unit16_t for both operands.

Sorry, this is the bit I don't follow. "the usual arithmetic
conversion" isn't something that requires a "reason" it's a thing of
its own. I quoted it in my original reply, but applying "the usual
arithmetic conversion" to "uint16_t" should result in "int", unless
I'm missing something.

- David



More information about the cfe-dev mailing list