<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Incompatibility with mingw-w64 intrinsic headers"
   href="https://bugs.llvm.org/show_bug.cgi?id=43642">43642</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incompatibility with mingw-w64 intrinsic headers
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Headers
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>re.mcclue@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22652" name="attach_22652" title="windows cmd error output screenshot">attachment 22652</a> <a href="attachment.cgi?id=22652&action=edit" title="windows cmd error output screenshot">[details]</a></span>
windows cmd error output screenshot

I have downloaded and installed clang 9.0 on windows 10 from
<a href="http://releases.llvm.org/download.html">http://releases.llvm.org/download.html</a> and mingw 8.1 from
<a href="https://sourceforge.net/projects/mingw-w64/">https://sourceforge.net/projects/mingw-w64/</a>

I tried to compile sdl 2.0.10 with clang + mingw. I obtained an error relating
to intrin.h/xsaveintrin.h. Specifically:

  function cannot return function type 'int (unsigned int)'
unsigned __int64 _xgetbv(unsigned int);

  note: expanded from macro 'xgetbv'
#define _xgetbv(A) __builtin_ia32_xgetbv((long long)(A))

I was able to compile successfully with llvm 8.0, so I assume it is a problem
on the llvm end rather than sdl2.

Please view attachment for a detailed screenshot of windows cmd error output.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>