title: Can't compile Objective-C code with clang
body: <p>I get following error with following Objective-C code, while trying to compile it with clang.</p>
  
  <p>Obj-C Code:</p>
  
  <pre><code>// first program example
  
  #import &lt;Foundation/Foundation.h&gt;
  
  int main (int argc, const char * argv[]) {
      @autoreleasepool {
         NSLog (@"Programming is fun!");
      }
      return 0;
  }
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>main.m:6:5: error: unexpected '@' in program
      @autoreleasepool {
      ^
  main.m:7:38: error: extraneous ')' before ';'
      NSLog (@"Programming is fun!");
                                   ^
  main.m:7:16: warning: expression result unused [-Wunused-value]
      NSLog (@"Programming is fun!");
             ^~~~~~~~~~~~~~~~~~~~~~
  main.m:9:5: error: expected identifier or '('
      return 0;
      ^
  main.m:10:1: error: expected external declaration
  }
  ^
  1 warning and 4 errors generated.
  </code></pre>
  
  <p>I can compile without error within XCode.</p>
  
  <p>Clang info:
  Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
  Target: x86_64-apple-darwin11.3.0
  Thread model: posix</p>