title: duplicate declaration global variable in C
body: <p>why does this work within global scope:</p>
  
  <pre><code>static int a;
  static int a=0;
  </code></pre>
  
  <p>but not within function's body:</p>
  
  <pre><code>void foo()
  {
      static int b;
      static int b=0; //error: Duplicate declaration of global variable 'b'
      ...
  </code></pre>
  
  <p>using clion 2017.3.1, C99, gcc5.4</p>