title: How to let compiler catch inconsistent type of global variables in two source files of C
body: <p>my1.c</p>
  <pre><code>float e;
  void f1(){ e=3.0;}
  </code></pre>
  <p>my2.c</p>
  <pre><code>#include &lt;stdio.h&gt;
  int e=0;
  void f1();
  void main(){
    printf(&quot;%d in main \n&quot;, e);
    f1();
    printf(&quot;%d in main \n&quot;, e);
  }
  
  </code></pre>
  <p>Here the global variable <code>e</code> is mistakenly declared as <code>float</code> and <code>int</code> in two source files.</p>
  <p>How to let the linker raise error for this inconsistency?</p>