https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63431

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Jonathan Wakely from comment #1)
> -Wconversion

Thanks for that. I tried it out and I got far more
warnings than I could triage. 

While all the new warnings that I checked seemed technically
accurate, very few seem useful. E.g. for source code

float end = 9434.20 + 42994.82;

I got

aug4a.cc:7:23: warning: conversion to ‘float’ alters ‘double’ constant value
[-Wfloat-conversion]
 float end = 9434.20 + 42994.82;
                       ^
Floats and doubles are only ever approximate, so I used -Wno-float-conversion.
That didn't help much.

I'd be happier with a much smaller warning that only
ever warned for floats and double literals being put into
integral types, as per clang.

Reply via email to