 <p>I suspect you are trying to compile your code as C++ rather than C. In C++, <code>try</code> is a <a href="http://en.cppreference.com/w/cpp/keyword" rel="nofollow">reserved word</a> (it is used in exception handling).</p> <pre><code>$ gcc test.c $ g++ test.c test.c:3:6: error: expected unqualified-id before 'try' </code></pre> <p>You can use <code>-x</code> to set the language explicitly (with either <code>gcc</code> or <code>g++</code>):</p> <pre><code>$ gcc -x c test.c $ gcc -x c++ test.c test.c:3:6: error: expected unqualified-id before 'try' </code></pre>