AndyG added a comment. Hi Richard,
Thank you for looking at my patch. I would argue that the code printf(minimal ? "%i\n" : "%i: %s\n", code, msg); is valid and should //not// cause a warning due to unused arguments since at least one code path uses all the arguments. This in my view is the problem with the diagnostic as it currently stands. I should expect that the following would cause the warning: printf(minimal ? "%i\n" : "%i: %s\n", code, msg, unused); which indeed it still does under this patch for the argument 'unused'. Also, where the compiler can determine that a code path is ever followed then it will still produce the warning, as in: printf(1 ? "%i\n" : "%i: %s\n", code, msg); Cheers, Andy http://reviews.llvm.org/D15636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits