<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112121>112121</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Dereferencing void pointer shouldn't be rejected
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Halalaluyafail3
</td>
</tr>
</table>
<pre>
Clang rejects dereferencing a void pointer, for example:
```c
*(void*)0;
```
I don't see any constraints that this would violate so this should be OK I think, at least as long as the expression goes unevaluated. GCC accepts this (with a warning by default), MSVC rejects it but even in contexts that should make sense like `&*(void*)0`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkUsuO2zAM_Br5Qmxg0XESH3zYzSLtoih6KNA7ZTG2uooUiHIef18oSd-wAYmUSM6MhkTcGJh71b6o9rWiOU8x9R_Jl2--0p6cbyoT7bXfegojJP7OQxawnHjPicPgwggEp-gsHKMLmZPCLexjAr7Q4ehZNc-qflX1s1rV9394xPiscFMqb7uuVs3LPzfv4RvYGBSuMwgzULjCEIPkRC5kgTxRhjw5gXOcvYWTi54yg8R7VqZb2jB8-QRvJRfeC0TK4JkkAwn4WFiUXgx8OSYWcTHAGFlgDnwiP1Nmu4AP2y3QMPDxNtgJKNycXZ6A4EwpFDHMFSzvafZZYVcGff76bftLOJfBzBn4xAFcKEQyX36yeEA90DuDcBAG794ZihC4-l-uVb2obN_Yrumo4l6vcbPulohdNfWtZtLa8F63aMlaY81mMJ22tSG7IVu5Hmtc6lo39bJZ192CN5ZbO6yGRltq26Va1nwg5xfenw6LmMbKiczca40adeXJsJebcxADn-F2qhCLkVJfip7MPIpa1t5Jlt9tssue-9e_HPSnfx4y3F_c8EM6ttWcfD_lfJRiKdwp3I0uT7NZDPGgcFcGPJanY4qlSOHuBksU7h64Tz3-CAAA__9xUfak">