On Sep 28, 2011, at 11:19 PM, Matt Beaumont-Gay wrote: > On Wed, Sep 28, 2011 at 22:52, John McCall <[email protected]> wrote: >> >> On Sep 28, 2011, at 10:25 PM, Matt Beaumont-Gay wrote: >>> The noisy warning in question is floating-point-literal-to-int, which >>> fires on a lot of code like "int kNumMicrosPerSecond = 1e6;". How >>> would you feel about moving that warning under a more specific flag? >>> And, to get slightly off-topic, how would you feel about adding code >>> to that warning to silence it in "safe" cases for literals written in >>> exponential form? >> >> I think we should definitely not be warning for conversions that >> preserve values exactly. > > I'd still like to warn on "int i = 1.0", since we can offer a fixit > hint that is always a strict (if minor) improvement.
Sure, that seems reasonable; we can gate it on the existence of a floating point. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
