title: Static vs. external intrinsics
body: <p>The Clang 6.0.1 avxintrin.h has the declaration:</p>
  
  <pre><code>static __inline __m256i __DEFAULT_FN_ATTRS _mm256_set1_epi32(int)
  </code></pre>
  
  <p>GCC 5.5 has:</p>
  
  <pre><code>extern __inline __m256i __attribute__((__gnu_inline__, _always_inline__, __artificial__)) _mm256_set1_epi32(int)
  </code></pre>
  
  <p><strong>Why would one be <code>extern</code> and one <code>static</code>?</strong> This is showing up for me in an <code>inline</code> function that calls <code>_mm256_set1_epi32</code>. Clang wants it to be declared <code>static</code>:</p>
  
  <pre><code>#include &lt;immintrin.h&gt;
  
  inline void SimdBlockBloomFilter_make_mask() {
    _mm256_set1_epi32(1);
  }
  </code></pre>
  
  <p>With <code>-Weverything</code>:</p>
  
  <pre><code>warning: static function '_mm256_set1_epi32' is used in an inline
  function with external linkage [-Wstatic-in-inline]
  </code></pre>
  
  <p>This error does <em>not</em> show up when compiling with Clang++.</p>