title: In C, why don't I get an error when I declare an global variable in different data type in an other file?
body: <p>I have tried the following code:</p>
  
  <p>File1.c:</p>
  
  <pre><code>int x;
  </code></pre>
  
  <p>File2.c:</p>
  
  <pre><code>extern char x;
  main()
  {
      x=10;
      ....
      ....
  }
  </code></pre>
  
  <p>and compiled as</p>
  
  <p>$gcc File1.c File2.c</p>
  
  <p>and I didn't get any error but I was expecting one.</p>