title: switch and string literal characters in C
body: <p>Take a look at the following example:</p>
  
  <pre><code>int main(){
          char *s = "Hello";
          switch (s[0]) {
                  case "Hello"[0]:
                          return 1;
                  case "Goodbye"[0]:
                          return 2;
                  default:
                          return 0;
          }
  }
  </code></pre>
  
  <p>When compiling this example, I get an error complaining about the case label not being an integer. But this seems incorrect as <code>"..."[0]</code> resolves to an integer.</p>
  
  <p>Can someone shed some light on this and explain why this code doesn't compile?</p>