title: Warning for inexact floating-point constants
body: <p>Questions like "<em>Why isn't 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1 = 0.8?</em>" got me thinking that...</p>
  
  <p>... It would probably be nice to have the compiler warn about the floating-point constants that it rounds to the nearest representable in the binary floating-point type (e.g. 0.1 and 0.8 are rounded in radix-2 floating-point, otherwise they'd need an infinite amount of space to store the infinite number of digits).</p>
  
  <p>I've looked up gcc warnings and so far found none for this purpose (<code>-Wall</code>, <code>-Wextra</code>, <code>-Wfloat-equal</code>, <code>-Wconversion</code>, <code>-Wcoercion</code> (unsupported or C only?), <code>-Wtraditional</code> (C only) don't appear to be doing what I want).</p>
  
  <p>I haven't found such a warning in Microsoft Visual C++ compiler either.</p>
  
  <p>Am I missing a hidden or rarely-used option?</p>
  
  <p>Is there any compiler at all that has this kind of warning?</p>
  
  <p><strong>EDIT</strong>: This warning could be useful for educational purposes and serve as a reminder to those new to floating-point.</p>