title: How to cast / assign one enum value to another enum
body: <p>I have 2 enums in 2 different modules that have exactly same value-set. How can I cast one to another?</p>
  
  <pre><code>typedef EnumA{
  a_dog = 0,
  a_cat = 1
  } EnumA;
  
  typedef EnumB{
  b_dog = 0,
  b_cat = 1
  } EnumB;
  
  EnumA a = a_dog;
  EnumB b;
  
  b = a;
  </code></pre>
  
  <p>Such an assignment is resulting in a warning: enumerated type mixed with another type
  Can I avoid switch-case by typecasting, like say</p>
  
  <pre><code>b = (int)a;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>b = (EnumB)a;
  </code></pre>