title: Is `extern "C"` a part of the type of a function?
body: <p>I don't see any comment in the standard except linkage related things.</p>
  
  <p>Though the standard doesn't say anything about calling convention,  the calling conventions might be different between C and C++ in the real world, so I expected that the types of a C function and a C++ function are different. But it seems not, especially in GCC.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;type_traits&gt;
  
  extern "C" {
    int c_func(int);
  }
  
  int cpp_func(int);
  
  static_assert(!std::is_same&lt;decltype(c_func), decltype(cpp_func)&gt;::value,
                "It should not be the same type");
  </code></pre>
  
  <p><code>static_assert</code> fails since GCC considers those functions have the same type.</p>
  
  <ul>
  <li>Is <code>extern "C"</code> a part of the type of a function?</li>
  <li>How do I check if a function uses C calling convention or C++ calling convention?</li>
  </ul>