title: This source code is switching on a string in C. How does it do that?
body: <p>I'm reading through some emulator code and I've countered something truly odd:</p>
  
  <pre><code>switch (reg){
      case 'eax':
      /* and so on*/
  }
  </code></pre>
  
  <p>How is this possible? I thought you could only <code>switch</code> on integral types. Is there some macro trickery going on?</p>