title: Why does 'typeof enum constant' generate a warning when compared to a variable of enum type?
body: <p>I have the following code.</p>
  
  <pre><code>typedef enum {FOO, BAR} Baz;
  
  int main()
  {
      Baz f1 = FOO;
      typeof(FOO) f2 = FOO;
      return (f1 == f2);
  }
  </code></pre>
  
  <p>My compilation using <code>gcc -Wextra foo.c</code> generates a warning saying</p>
  
  <pre class="lang-none prettyprint-override"><code>foo.c: In function ‘main’:
  foo.c:7:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   return (f1 == f2);
               ^
  </code></pre>
  
  <p>My gcc version</p>
  
  <pre class="lang-none prettyprint-override"><code>gcc --version
  gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
  </code></pre>
  
  <p>How can I fix this problem?</p>