tbp <tbp...@gmail.com> writes: > On Tue, Sep 14, 2010 at 8:44 PM, Ian Lance Taylor <i...@google.com> wrote: >> Let me put it a different way: what is it that you want, expressed in >> terms of C/C++ code? What should the compiler be warning about? > Hmm. I think the provided example captures most of what i care about, > float area(float radius) { return 3.14159 * radius * radius; } > and even forgotten/disguised uses of, say, M_PI, would fall in that > category after-all.
We are talking at cross-purposes. You have provided two examples. The compiler can't implement examples. The compiler can only implement some sort of definition. So far my best guess is that your definition is "warn about implicit conversions from float to double except for those conversions caused by default argument promotion applied to arguments passed to unnamed parameters." Is that what you want? Ian