Re: git: 9d87c1aac4a8 - main - libc: Add missing kill_dependency macro
Date: Sat, 20 Jun 2026 13:59:52 UTC
Hey, I took another look and dug a bit deeper to make sure whether we should adopt GCC’s form here, and I still think we should stick with the current one. First, although I still need to investigate further, I doubt it adds any optimisation benefits, nor would omitting it incur a penalty. More importantly, what we currently have fully conforms to the §7.17.3.1 and is therefore in its most portable form. There is also ongoing work (e.g. N3607) to retire `memory_order_consume` and obsolete `kill_dependency`, with the proposed wording being that the macro “has no other effect than its result”, which is essentially just `(y)`, right? So presumably Clang's own `<stdatomic.h>` uses `(y)` for the same sort of reasons. However, I’m happy to discuss it further, and please do correct me if you have data suggesting otherwise. In the meantime, I’ll do a bit more research and will keep you posted if I find anything else. Cheers, Faraz