<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64258>64258</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Compilation error on binary operator "==" for 32-bit pointer
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ararmine
      </td>
    </tr>
</table>

<pre>
    The following C++ code is not compiled with clang x86-64 v16.0.0 with MS extensions enabled, while it compiles successfully with X86 msvc v19.
Steps to reproduce:

1. cat test.cpp
```
#include <string>
#include <iostream>

int main()
{
  std::string s("asdf");
  const char* __ptr32 c = "asdf";
  if (s == c) {
 std::cout << "Success!\n";
  }
  return 0;
}
```

2. clang test.cpp -S -fms-extensions
```
test.cpp:8:9: error: invalid operands to binary expression ('std::string' (aka 'basic_string<char>') and 'const char * __ptr32')
  if (s == c) {
      ~ ^  ~
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk02PtCgUhX_NdXNTRqH8Wrioru7azapmMbsO4rVkBsEAVndv3t8-QevjnU4vxhjEnHMv8JwgvFcXQ9RC8QLFayKWMFrXCifcpAwlne2_2j9HwsFqbT-UueAR2AuwF5S2J1QejQ0o7TQrTT1-qDCi1MJc8LMud-Uer3mZZmm2KX-ckT4DGa-s8UhGdJp6YEf8GJUmVI9OHv0iJXk_LFp_bcV_1SVO_irxmjcpZK-QHc6BZo_BoqPZ2X6RBPywSduYpyhFwEA-pHKeb1KZ3d7tl3FlpF56QuBHH5wyF-BvP4nK-uBITE95HZUJOAllgNXAmptSvWwTRB_6uC1-2HqjX31M-H4AxmIFf3ilNT6gHIUDdsD39zk4zlAi8Ff8reZZoAYEVvtoiB4JrMHn2o-lpV1CPAHwY-xz3ugCy6E4mv92hOr1PnUUFmcwe6gP7TvDdWTpLfs7b9ydcTdMfvdM_cfyRz78UAM_NMAPSM5ZFyfKXIVWPdqZnDD9mnenjHBfSJ-zIx_74sq0-oYaWBUF8Y9AYFUnvJLv94CPK2T-BqyKzITpo-fJH38LYPP8P-Tr8wuheEP89eNpk77lfcMbkVCbl01WZ_uqyZOxraTM82Goh1rueVnLouoa4lnXM1nLfi8T1bKM8azieZ4XTZGnmShEIbjMi2KfdRXBPqNJKJ1qfZ1S6y6J8n6httyzok606Ej7-113bTTtuuXiYZ9p5YN_lgUVNLXH9TaKEAGveaA1d_ZrHMFGTmwjAYzhYB1ytutUwNkqE8gli9PtGMLsYzLsBOx0UWFculTaCdgpLnn77GZn_yYZgJ3WbXtgp3Xn_wYAAP___otceA">