On Thu, Nov 17, 2005 at 03:18:00PM -0800, Ian Lance Taylor wrote: > I don't think you should get a warning for not using the return value of a > function, at least not under -Wunused.
For this, I agree. Except that we're not talking about the return value of the function directly, we're talking about the return value of a cast. Given that one can always cast any value to void to suppress this warning, I'm unconcerned about getting every single edge case "correct". Especially for edge cases for which one can reasonably disagree as to what is correct. A stronger case for changing this would be that gcc version n-1 didn't warn. As discussed elsewhere, some modicum of stability in warnings is desirable from the user's perspective. I don't know whether or not this applies in this case. r~