https://git.reactos.org/?p=reactos.git;a=commitdiff;h=47e3f49e5266ce9e4668b…
commit 47e3f49e5266ce9e4668bc96140161877ed0ba41
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Oct 14 00:08:12 2024 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Jan 16 14:18:53 2025 +0200
[UCRT] No __declspec(spectre(nomitigation)) for GCC/Clang
---
sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h
b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h
index bb4d545d88c..6f9878a52cc 100644
--- a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h
+++ b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h
@@ -576,7 +576,10 @@ public:
// Instead of using an lfence mitigation, we can fill the table to a power of two,
// then bitwise-and all values used to index into the array.
- __declspec(spectre(nomitigation)) T const& operator[](size_t const index) const
+ #if defined(_MSC_VER) && !defined(__clang__)
+ __declspec(spectre(nomitigation))
+ #endif
+ T const& operator[](size_t const index) const
{
return m_array[index & mask];
}