jyknight wrote:

Yes, the code in libpcap is correct, and the new Clang behavior is incorrect.

`__atomic_clear` and `__atomic_test_and_set` are intentionally different from 
the other atomic builtins, in that they are _not_ type-generic, but instead 
always operate on the single byte at the provided address. Thus, the 
pointee-type is irrelevant. (And yes, both operations should behave the same; 
they are a pair. GCC's docs for `__atomic_clear` are wrong; both are actually 
implemented by GCC and previous-Clang as accepting `void*`.)

https://github.com/llvm/llvm-project/pull/120449
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to