title: Error: jump to label 'failed' [-fpermissive], GCC vs VS
body: <p>We added some new code in our PNG decoding routines for our game engine. The additional chunk defined is just there to read some values -- no big deal.</p>
  
  <p>On Visual C++, it compiles just fine. On GCC, which is what we primarily use, we now get a strange issue that has never happened before:</p>
  
  <p><a href="http://i.stack.imgur.com/YOkkZ.gif" rel="nofollow">compile_problems</a></p>
  
  <p>This is the added code:</p>
  
  <pre><code>    /* read grAb chunk */
  png_unknown_chunk *unknowns;
  int num_unknowns = png_get_unknown_chunks(png_ptr, info_ptr, &amp;unknowns);
  
  for (int i = 0; i &lt; num_unknowns; i++)
  {
      if (!memcmp(unknowns[i].name, "grAb", 4))
      {
          png_grAb_t *grAb = reinterpret_cast&lt;png_grAb_t *&gt;(unknowns[i].data);
          grAb-&gt;x = EPI_BE_S32(grAb-&gt;x) + 160 - width / 2;
          grAb-&gt;y = EPI_BE_S32(grAb-&gt;y) + 200 - 32 - height;
          img-&gt;grAb = grAb;
          break;
      }
  }
  </code></pre>
  
  <p>Looks just fine to me. This is the only thing added to our original file. The complete file is here:
  <a href="https://github.com/3dfxdev/hyper3DGE/blob/master/epi/image_png.cc" rel="nofollow">goto Line 59 of image_data.cc</a></p>
  
  <p>And the function where this bombs out:
  image_data_c *PNG_Load(file_c *f, int read_flags)</p>
  
  <p>I don't understand what could be happening, as this worked perfectly fine before and never had issue with cross-initialization or our case handling.</p>
  
  <p>If I could get some help, I would really appreciate it!</p>
  
  <hr>