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

    <tr>
        <th>Summary</th>
        <td>
            Clang has too strict warning on unsequenced modification and access?
        </td>
    </tr>

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

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

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

<pre>
    Consider this code (https://godbolt.org/z/q8Pd399hG)
```
char *map (char *s, int (*f)(int)) { char *p=s; for (;*p;) *p++=f (*p); return s; }
```
Clang (trunk) gives a warning:
```
<source>:1:62: warning: unsequenced modification and access to 'p' [-Wunsequenced]
char *map (char *s, int (*f)(int)) { char *p=s; for (;*p;) *p++=f (*p); return s; }
 ^      ~
```

Now, there should be a sequence point between passing the arguments to a function, and returning from that function, and I think that should also hold for function pointers. Isn't the warning therefore too strict?

Might be related to #60931
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVEGTmyAY_TWfl282IxA1HjzEZO3soZ3eekb8VLoKLuDutIf-9g4maTPtHnpshomA73289wCl93owRBVkNWTnRK5htK4ydiZjyCttk9Z236qTNV535DCM2qOyHSHwwxjC4kEcgTfAm8F2rZ3CzroBePMdePNy-NyJshw_AC8hPUN6hDy9tm2oRukQ-HGWS6x3G3rgJ9QmxDngxz7S-UGbsHVKhKLGG3YBcfYgauyt2_CivszWGzJ2eR2bOPfXekssI2p0FFZncGNDcX5X4WmSZoi84FbzHEsO-pU8SnyTzmgzRPvvEUGcvF2dIhCPII4MxDHnII53PFyNp5eVjKIOZ9vpXisZtDUoTYdSKfIeg0XgxQK8QMjqhy93HMjO_22MCNkjbr8f78ez_X-yb1FjGMkR-tGuU4ctocSbR1xsNNBSeCMyuMTzaoZIQOmGdSYTtogk9qtRMbtYL8Z3URXBvbMzhlGGvzBP8Tib58vL6_Jy8hZHO3VbEjfGRQc5v8Mnb4AXYdNw3cuLgd46wmAt-uC0CiCae6sf9TBGI-hokoG6y8aKPC0FS7pKdKUoZUIVy4tyLw57xpKxEpKpjO171oteqjTnWclFxlNR8EIUQiW64ikXqeCM833K2O7ARK5YJ1h6aEtVtrBPaZZ62k3T6xyvZqK9X6nKWZ6mySRbmvzt8rsqgh7adfCwTyftg_9NCzpMVF2uwyj9ndFfKVjzLycaRJOsbqr--HjoMK7tTtkZeBMXvT4eFme_kgrAm024B95s2n8GAAD__8bGbCM">