Should the compiler give a warning if enum labels don't match type?
<p>I'd like the compiler to give a warning like:</p>

<p>"Banana is not a Color."</p>

<p>I understand that in the context of a switch statement the labels are promoted to int an the compiler is happy with 0 and doesn't care if it is "Green" or "Banana".</p>

<p>I was hoping -Wconversion for GCC would do the trick.</p>

<pre><code>enum Color
  {
    Green = 0
  };

enum Fruit
  {
    Banana = 0
  };

int main()
{
  Color c = Green;
  switch (c)
    {
    case Banana:
      std::cerr &lt;&lt; "Banana" &lt;&lt; std::endl;
      break;
    }
  return 0;
}
</code></pre>
