[cfe-commits] [PATCH] Tighten up -Wliteral-conversion

Douglas Gregor dgregor at apple.com
Thu Oct 13 17:49:52 PDT 2011


On Oct 4, 2011, at 6:05 PM, Matt Beaumont-Gay wrote:

> This patch changes -Wliteral-conversion to only warn when the
> conversion would result in losing information. Previously, the warning
> had a high noise level in code that makes extensive use of literals
> like "123e6". Now, it catches exactly the bugs it was originally
> intended for, e.g. "const int kFooPercentage = 5e-2" or "sleep(0.1)".

LGTM!

	- Doug



More information about the cfe-commits mailing list