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

    <tr>
        <th>Summary</th>
        <td>
            Initialization of global pointers is accepted by clang++ but rejected by clang
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    For the following code,

```c++
unsigned int * p = &(*(unsigned int *)0x400);
```

clang++ accepts it, but clang rejects with error 
```bash
a.c:1:20: error: initializer element is not a compile-time constant
    1 | unsigned int * p = &(*(unsigned int *)0x400);
      | 
```


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysksFu5CwMx5_GuVgdOTB0kgOHtNVI32MA8SR8IhABabf79KtMWu1o97rIEiCbn7H_NqX4KTJrUC-g3hqz1TllbTmW2RO1jU3jp76mjHVmvKUQ0oePE7o0MohXoGG3ZzrMgXjZjYYt3rkj-lgRxIArgnxDEM8gOhADiO7PEBA9_TgTgehBvjxijywumDgdCdA4x2st6CuIV7RbxbsXM__Prhb88HVGzjllfARZU2agwZwcyKEFOQgCORyB-8FHX70J_idn5MALx4q-YEwVDbq0rD7wU_ULo0uxVBMr0ICI2CJcXvFfFI33tdP-7kAzajn2sjcN6_aiRCe7jlQza2tMbxSbizOqv7gbk5TMt05S2_XKjo3XgoSiS9u17ZlInfh2cc-2VdR15PrOwJl4MT6cQnhfTilPjS9lY92ee0XUBGM5lPuQCPElhNj1_77J4ZZTrBzH3aHemqx30pPdpgJnCr7U8ptdfQ2s__vutqk-RUw3nEKyJuCafKycy977Q2ke0X7i4wTsmh9qP_iaLQc917oWkAOIK4jr5Ou82ZNLC4jr_oGv7WnNaX8N4nqvtIC4fhX7rsWvAAAA___8Cu4l">