title: Clang C Compiler 'class' keyword reserved?
body: <p>Hi I am compiling ffmpeg using xcode, which I believe uses clang for compilation. In ffmpeg there is a struct with a member variable named 'class' I believe this is perfectly fine in C but clang is trying to parse it as a keyword. Any idea how to fix? Basically the following in a cpp file will cause the error:</p>
  
  <pre><code>extern C {
      typedef struct {
          int class;
      } SomeStruct;
  }
  </code></pre>
  
  <p>It tries to interpret class as a keyword.</p>
  
  <p>FYI the file that is throwing the error in ffmpeg is libavcodec/mpegvideo.h and I need to include this to have access to the MpegEncContext struct to pull out motion map info.</p>
  
  <p><em>EDIT</em></p>
  
  <p>The above code sample was just to demonstrate the error. But perhaps its fixable in another way. In my actual code I have it like this:</p>
  
  <pre><code>#ifdef __cplusplus
  extern "C" {
  #endif
  
      #include "libavcodec/mpegvideo.h"
      #include "libavformat/avformat.h"
  
  #if __cplusplus
  } //Extern C
  #endif
  </code></pre>
  
  <p>How would I get that to include the two files as C files and not C++?</p>
  
  <p>Thanks</p>