[Bug c/95715] __atomic_fetch_add accepts nonsense arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95715 Andrew Pinski changed: What|Removed |Added CC||patrick at rivosinc dot com --- Comment #2 from Andrew Pinski --- *** Bug 115441 has been marked as a duplicate of this bug. ***
[Bug c/95715] __atomic_fetch_add accepts nonsense arguments
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95715 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2020-06-16 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Jonathan Wakely --- We also accept this, adding two void* pointer together: void* i = 0; void* p = 0; void* r = __atomic_fetch_add(, , __ATOMIC_SEQ_CST); The second argument should be ptrdiff_t. Or adding a double* to an int*: double* i = 0; int* p = 0; void* r = __atomic_fetch_add(, , __ATOMIC_SEQ_CST);