[php-src] PR #11931: Don't try to use C11 atomics, which are not const

From: Date: Thu, 10 Aug 2023 07:44:24 +0000
Subject: [php-src] PR #11931: Don't try to use C11 atomics, which are not const
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-23337@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/11931 Author: ryandesign [C11 did not have](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1807.htm) the const qualifier on atomic_load; C17 does. One can either use C11 atomics by casting away the constness, which was proposed and rejected in GH-8764, or one can avoid using C11 atomics altogether, instead using C17 atomics if available, which is what this change does. Fixes GH-8881 ----- This issue only affects the PHP 8.2 and later branches. This issue only affects compilers in C11 mode that do not support C17. Compilers that do support C17 behave as though the const qualifier was present even when in C11 mode. It might only affect clang. ----- I'm not sure if I've written a satisfactory commit message. If not, feel free to reword it or let me know what needs to be changed.

« previous php.git-pulls (#23337) next »