<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 - error: comparison of distinct pointer types ('int *' and 'int * __ptr32')"
   href="https://bugs.llvm.org/show_bug.cgi?id=51889">51889</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error: comparison of distinct pointer types ('int *' and 'int * __ptr32')
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>12.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>akhuang@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ararmine2@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>1. cat test.cpp 

extern "C"
int printf(const char *,...);

int* b = (int*)-1;

int main()
{   
  if (b == (int * __ptr32) -1)
    printf("values are the same\n");
  else
    printf("values are different\n");
}

2. clang -fsyntax-only -target x86_64-windows-msvc -fms-extensions test.cpp

test.cpp:8:9: error: comparison of distinct pointer types ('int *' and 'int *
__ptr32')
  if (b == (int * __ptr32) -1)
      ~ ^  ~~~~~~~~~~~~~~~~~~
1 error generated.</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>