<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116736>116736</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] _Atomic Pointer Arithmetic error
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhangtianhao6
</td>
</tr>
</table>
<pre>
demo.c
```
#include<stdio.h>
int main(){
static int ia[2];
static volatile _Atomic (int *) a = (int *) (&ia[1]);
if ((a += (1)) != (int *) ((int *) (&ia[1]) + (1)))
printf("1");
}
```
compile failed
```
<source>:5:9: error: invalid operands to binary expression ('volatile _Atomic(int *)' and 'int')
5 | if ((a += (1)) != (int *) ((int *) (&ia[1]) + (1)))
| ~ ^ ~~~
1 error generated.
Compiler returned: 1
```
Gcc is ok
https://godbolt.org/z/fMqzoe4b5
Does llvm supprot _Atomic Pointer Arithmetic?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VMGOozgQ_ZriYnWEyyGEAwcSmj2ttH-wMnYleBdsxjbRdB_y7SNDNN3T6unjIAuwH-9VvYdBhmCulqiG4gRFm8klDs7Xr4O012ikHaQ7ZL3TL7Wmye0U5C3kDRzyx9imKIxV46IJxDlEbdxuAPG8gcZGNkljAY-AFZSnbTlEGY1iCTUSihNC0YJ4gOyB3twooxmJ_dtENxnFAI-JAdgAVkwyEO2HtbXMYZXkSRKrN1Vz2eCjZICnB5enR1Yi_43a1_JJ6p1OGlu12RsbLysBOSC-bwXK9tMklZvm5PcizUj687DFObjFK0oJi6YA0VQgGkbeO59ujL3J0WjmZvLS6sCiY72x0r8w-j57CsE4uxkpPwb8i1nAkkmrGWBpbAQs37wxxgoG5Zn94UzXkutxZ1A8M3a_3zeIbwGwK1nyMpLebevnLVHPPMXFW9IpIv55suv5L6WYCcz9v02HGOcAogHsALur070b4875K2D3Cthd_v726mjfF-81WkeBjeNtYmGZZ-_izw38jzM2kmeNN3GYKBoFost0LXQlKplRzUvBq-NBHHk21FSRxFxKpZFQir7ouaoOvCxFJQuuZGZqzHHPOa9ywas93-3FsRR7QbrXl57UEfY5TdKMu9RNajszISxUc34oxSEbZU9jWD9-RDVKe00btWgzXyfCU79cA-zz0YQY3iSiieP6xzivjKL9wt72WrLFj_WHKE0cln6n3ATYJenH5Wn27j9SEbBbWw2A3aPbW40_AgAA___4tU5M">