title: warning: data definition has no type or storage class
body: <p>I have a file <code>global.h</code> which is included across many files in the project and contain general headers. The relevant contents of file is given below:</p>
  
  <pre><code>#define DEBUG
  #ifdef DEBUG
  extern int debug_level;
  #endif
  </code></pre>
  
  <p>It has been included in <code>main.c</code> and there is a warning corresponding to the following line in <code>main.c</code></p>
  
  <pre><code>#ifdef DEBUG            
  debug_level = 6;   //compiler generates warning corresponding to this line.
  #endif
  </code></pre>
  
  <p>The warning message issued by compiler is: </p>
  
  <pre><code>src/main.c:14:1: warning: data definition has no type or storage class [enabled by default]
  src/main.c:14:1: warning: type defaults to ‘int’ in declaration of ‘debug_level’ [enabled by default]
  </code></pre>
  
  <p>I do not understand what is that I am doing wrong. Surprisingly the program works fine because I think that compiler assumes that the number is an <code>int</code>(by default).</p>