title: How to make clang build (like msvc and gcc) with double declared extern "C" functions in different namespaces
body: <p>I have this project, where two other projects get included, that provide headers for the same DLL. In one header the declarations are put into a namespace, in the other one not.
  That works well for GCC and MSVC, but I can't convince clang to compile it..
  So a minimal example would be:</p>
  
  <p>x.h:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;string&gt;
  #if defined __GNUC__
  # pragma GCC system_header
  #endif // __GNUC__
  
  namespace XX {
    struct Type {
      std::string name;
    };
  
    extern "C" int Func(Type);
  }
  </code></pre>
  
  <p>incl.h:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;string&gt;
  #if defined __GNUC__
  # pragma GCC system_header
  #endif // __GNUC__
  
  struct Type {
    std::string name;
  };
  
  extern "C" int Func(Type);
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include "incl.h"
  #include "x.h"
  
  int main()
  {
    return 0;
  }
  </code></pre>
  
  <p>G++ complains with a warning, but that is turned off with <code># pragma GCC system_header</code>.
  So, how can I get clang to build in an environment like this?</p>