title: <stdatomic.h> in GCC 4.8?
body: <p>I'd like to make use of the new atomic operations provided by the C11 standard. However, trying to <code>#include</code> the appropriate header file gives me this:</p>
  
  <pre><code> csort-par.c:5:23: fatal error: stdatomic.h: No such file or directory
   #include &lt;stdatomic.h&gt;
  </code></pre>
  
  <p>The documentation at <a href="http://gcc.gnu.org/wiki/C11Status" rel="noreferrer">http://gcc.gnu.org/wiki/C11Status</a> seems to say that the header file has been provided since GCC 4.7... am I missing something? <code>__STDC_NO_ATOMICS__</code> is not defined. </p>
  
  <p><code>gcc --version</code> is as follows:</p>
  
  <pre><code>gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
  Copyright (C) 2013 Free Software Foundation, Inc.
  </code></pre>
  
  <p>And I confirmed that <code>__STDC_NO_ATOMICS__</code> was not defined as follows:</p>
  
  <pre><code>#ifdef __STDC_NO_ATOMICS__
  #error yes
  #else
  #error no
  #endif
  </code></pre>
  
  <p>yields:</p>
  
  <pre><code>csort-par.c:10:2: error: #error no
   #error no
  </code></pre>
  
  <p>EDIT: Thanks for the swift replies.</p>
  
  <p>In case anyone stumbles on this from Google with the same question, here's a fix in the interim until they release GCC 4.9:</p>
  
  <p><a href="https://stackoverflow.com/questions/1130018/unix-portable-atomic-operations">UNIX Portable Atomic Operations</a></p>