[cfe-dev] The Conditional Operator and Unused Results

Justin Bogner mail at justinbogner.com
Sat Oct 2 13:24:34 PDT 2010


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




More information about the cfe-dev mailing list