title: Assign double constant to float variable without warning in C?
body: <p>In C programming language, the floating point constant is double type by default<br>
  so <code>3.1415</code> is double type, unless use 'f' or 'F' suffix to indicate float type.  </p>
  
  <p>I assume <code>const float pi = 3.1415</code> will cause a warning, but actually not.  </p>
  
  <p>when I try these under gcc with -Wall:</p>
  
  <pre><code>float f = 3.1415926;  
  double d = 3.1415926;  
  printf("f: %f\n", f);  
  printf("d: %f\n", d);  
  f = 3.1415926f;  
  printf("f: %f\n", f);  
  int i = 3.1415926;  
  printf("i: %d\n", i);  
  </code></pre>
  
  <p>the result is:  </p>
  
  <pre><code>f: 3.141593  
  d: 3.141593  
  f: 3.141593  
  i: 3
  </code></pre>
  
  <p>the result (including double variable) obviously lose precision, but compile without any warning.<br>
  so what did the compiler do with this? or did I misunderstand something?</p>