<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 - [MS] clang fails to compile function with __unaligned argument to class member"
   href="https://bugs.llvm.org/show_bug.cgi?id=36638">36638</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MS] clang fails to compile function with __unaligned argument to class member
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ilia.taraban@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang fails to compile function with __unaligned argument to class member:

=============== nice.cpp ==============

class A;
void func(void (A::*a)(int) __unaligned);

=======================================


<span class="quote">>>> clang -v</span >
clang version 7.0.0 (trunk 326880)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...

<span class="quote">>>> clang++ -c nice.cpp -fms-extensions</span >
nice.cpp:2:6: error: variable has incomplete type 'void'
void func(void (A::*a)(int) __unaligned);
     ^
nice.cpp:2:20: error: expected unqualified-id
void func(void (A::*a)(int) __unaligned);
                   ^
nice.cpp:2:21: error: use of undeclared identifier 'a'
void func(void (A::*a)(int) __unaligned);
                    ^
nice.cpp:2:27: error: expected '(' for function-style cast or type construction
void func(void (A::*a)(int) __unaligned);


But this test is compiled without any errors using cl and icl -
<a href="https://godbolt.org/g/iPp9Yq">https://godbolt.org/g/iPp9Yq</a></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>