On Tue, Sep 14, 2010 at 9:47 PM, Ian Lance Taylor wrote:
> 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
tbp writes:
> On Tue, Sep 14, 2010 at 8:44 PM, Ian Lance Taylor 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 ar
On Tue, Sep 14, 2010 at 8:44 PM, Ian Lance Taylor 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) { ret
tbp writes:
> On Tue, Sep 14, 2010 at 7:14 PM, Ian Lance Taylor wrote:
>> What is it that you want?
> I'd like to have a warning for when a value of type float is
> implicitly promoted to double, for performance reasons (on x86).
Let me put it a different way: what is it that you want, expresse
On Tue, Sep 14, 2010 at 7:14 PM, Ian Lance Taylor wrote:
> What is it that you want?
I'd like to have a warning for when a value of type float is
implicitly promoted to double, for performance reasons (on x86). Note
that in that context, caring about variadic functions makes little
sense to begin
On 9/14/2010 10:59 AM, Daniel Jacobowitz wrote:
>> printf("%f", f);
>> double.cc:5:7: warning: implicit conversion from 'float' to 'double'
> My two cents, but that looks exactly right to me. Passing the float
> to printf is going to convert it to a double and it will be printed as
> a dou
tbp writes:
> On Tue, Sep 14, 2010 at 4:58 PM, Ian Lance Taylor wrote:
>> This question is not appropriate for the mailing list g...@gcc.gnu.org.
>> ...
>> This is among the kinds of things which -Wdouble-promotion is documented
>> to warn about, so, yes, this is how it's meant to be.
> Honestly
On Tue, Sep 14, 2010 at 4:58 PM, Ian Lance Taylor wrote:
> This question is not appropriate for the mailing list g...@gcc.gnu.org.
> ...
> This is among the kinds of things which -Wdouble-promotion is documented
> to warn about, so, yes, this is how it's meant to be.
Honestly i've pondered not sen
tbp writes:
> I could really use -Wdouble-promotion but, atm, it appears quite impractical,
> $ cat double.cc
> #include
> void foo(...);
> int main() {
> float f = 1;
> foo(f);
> printf("%f", f);
> }
> $ /usr/local/gcc-4.6-20100913/bin/g++ -Wdouble-promotion double.cc
> double
On Tue, Sep 14, 2010 at 04:30:09PM +0200, tbp wrote:
> Hello,
> I could really use -Wdouble-promotion but, atm, it appears quite impractical,
> $ cat double.cc
> #include
> void foo(...);
> int main() {
> float f = 1;
> foo(f);
> printf("%f", f);
> }
> $ /usr/local/gcc-4.6-201009
Hello,
I could really use -Wdouble-promotion but, atm, it appears quite impractical,
$ cat double.cc
#include
void foo(...);
int main() {
float f = 1;
foo(f);
printf("%f", f);
}
$ /usr/local/gcc-4.6-20100913/bin/g++ -Wdouble-promotion double.cc
double.cc: In function 'int m
11 matches
Mail list logo