[cfe-commits] PATCH: Add -Wliteral-conversion to Clang

Chandler Carruth chandlerc at google.com
Tue Feb 15 22:13:13 PST 2011


This warning works similarly to -Wconversion, but (currently) only fires on
literal floating point values used to initialize an integer variable. It can
be expanded to cover more conversions as needed. These often occur due to
syntaxes like "10e5" which can surprise users as a double.

Thoughts? This look reasonable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110215/769051ca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_literal_conversion.patch
Type: application/octet-stream
Size: 4948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110215/769051ca/attachment.obj>


More information about the cfe-commits mailing list