[cfe-dev] The Conditional Operator and Unused Results

Chris Lattner clattner at apple.com
Sat Oct 2 13:37:01 PDT 2010


On Oct 2, 2010, at 1:24 PM, Justin Bogner wrote:

> I submitted [bug 8282], which is that statements like (x?y++:0) will
> warn about an unused result for the 0. This idiom occurs in macros for
> control flow, ie, in CPU_SET.
> 
> Currently, (x ? y : z) warns if either y or z would warn. Should this be
> changed to warn only if both y and z would warn?
> 
> [bug 8282]: http://llvm.org/bugs/show_bug.cgi?id=8282

What is the real-world code you're seeing this on, and what diagnostic are you getting?

-Chris



More information about the cfe-dev mailing list