update
CI / GCC 16 / C++26 / sanitizers (push) Failing after 4s
CI / GCC 16 / C++26 / werror (push) Failing after 3s
CI / GCC 16 / C++26 / default (push) Failing after 1m48s

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-25 23:42:52 +03:00
1 parent 3851aeb703
commit 053ee5b296
23 files changed
+845 -93

No files matched your search

+5 -2
View File
@@ -103,7 +103,10 @@ template <typename T>
inline void do_not_optimize(T& val) noexcept
{
#if defined(__GNUC__) || defined(__clang__)
asm volatile("" : "+r,m"(val) : : "memory");
// A memory operand works for every object type and remains accepted by
// GCC 16, which rejects the old mixed "+r,m" alternative constraint for
// some scalar instantiations.
asm volatile("" : "+m"(val) : : "memory");
#else
volatile T* p = &val;
(void)*p;
@@ -114,7 +117,7 @@ template <typename T>
inline void do_not_optimize(const T& val) noexcept
{
#if defined(__GNUC__) || defined(__clang__)
asm volatile("" : : "r,m"(val) : "memory");
asm volatile("" : : "m"(val) : "memory");
#else
volatile const T* p = &val;
(void)*p;