title: First class labels in C?
body: <p>Hey I am wondering if anyone can help me with first class labels in C.</p>
  
  <p>I currently am trying to read java bytecode from memory(FLASH Memory of an AVR device) and I want to treat each instruction as a label, and dispatch the instruction by using a goto statement and jumping to the appropiate label.</p>
  
  <p>But the problem is the function I use to read the instruction from memory returns a unsigned byte.</p>
  
  <pre><code>u08_t nvmfile_read08(void *addr) {
    u08_t val;
    addr = NVMFILE_ADDR(addr);  // remove marker (if present)
    memcpy_P((u08_t*)&amp;val, (PGM_P)addr, sizeof(val));
    return val;
  }
  
  instr = nvmfile_read08(pc);
  </code></pre>
  
  <p>So my question is how can convert instr into something like:</p>
  
  <pre><code>void *ptr;
  ptr = &amp;&amp;instr;
  goto *ptr; 
  </code></pre>
  
  <p>And this code will then ideally jump to this label:(Assuming iload was the last instruction read)</p>
  
  <pre><code>iload:
     // Execute the iload jvm instruction.
  </code></pre>
  
  <p>Thanks</p>