title: __attribute__((const)) vs __attribute__((pure)) in GNU C
body: <p>What is the difference between <code>__attribute__((const))</code> and <code>__attribute__((pure))</code> in GNU C?</p>
  
  <pre><code>__attribute__((const)) int f() {
      /* ... */
      return 4;
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>__attribute__((pure)) int f() {
      /* ... */
      return 4;
  }
  </code></pre>