https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124822
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-04-08
Ever confirmed|0 |1
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
I think the reason why the trunk does not warn at all is because waccess2 is no
longer warning (due to r16-6531-g6345c1c11c2024); let me file a seperate issue
for that.
But for the reason why GCC 15.2.0 didn't warn for this case is because the code
just does not handle the internal function ATOMIC_COMPARE_EXCHANGE, only the
builtin __atomic_compare_exchange_8.
_11 = .ATOMIC_COMPARE_EXCHANGE (_4, _10, __p2.4_9, 264, 0, 3);
vs:
_10 = __atomic_compare_exchange_8 (_4, &h, __p2.4_9, 1, 0, 3);