title: declaring enum in global scope
body: <p>gcc 4.4.4 c89</p>
  
  <p>I have the following in my state.c file:</p>
  
  <pre><code>enum State {
      IDLE_ST,
      START_ST,
      RUNNING_ST,
      STOPPED_ST,
  };
  
  State g_current_state = State.IDLE_ST;
  </code></pre>
  
  <p>I get the following error when I try and compile.</p>
  
  <pre><code>error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_current_state’
  </code></pre>
  
  <p>Is there some with declaring a variable of type enum in global scope?</p>
  
  <p>Many thanks for any suggestions,</p>