hamt: Fix compilation error on MSVC (regression 2026-08-10).

* lib/hamt.h (HAVE_C11__ATOMIC): Add parentheses to #if expression.
This commit is contained in:
Bruno Haible
2026-08-12 12:14:51 +02:00
parent 7fd62ba9bd
commit b2bb0c2fc0
2 changed files with 13 additions and 7 deletions
+5
View File
@@ -1,3 +1,8 @@
2026-08-12 Bruno Haible <bruno@clisp.org>
hamt: Fix compilation error on MSVC (regression 2026-08-10).
* lib/hamt.h (HAVE_C11__ATOMIC): Add parentheses to #if expression.
2026-08-12 Bruno Haible <bruno@clisp.org>
hamt: Fix compilation error (regression 2026-08-10).
+8 -7
View File
@@ -68,13 +68,14 @@ _GL_INLINE_HEADER_BEGIN
#ifndef HAVE_C11__ATOMIC
# if (!defined __STDC_NO_ATOMICS__ && !defined __cplusplus \
&& (defined __apple_build_version__ ? 8000000 <= __apple_build_version__ \
: defined __clang__ ? 4 <= __clang_major__ \
: defined _MSC_VER ? 1935 <= _MSC_VER \
: defined __NVCOMPILER \
? 21 < __NVCOMPILER_MAJOR__ + (3 <= __NVCOMPILER_MINOR__) \
: defined __GNUC__ ? 4 < __GNUC__ + (9 <= __GNUC_MINOR__) \
: (!defined __xlC__ && !defined __PGI \
&& defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)))
: (defined __clang__ ? 4 <= __clang_major__ \
: (defined _MSC_VER ? 1935 <= _MSC_VER \
: (defined __NVCOMPILER \
? 21 < __NVCOMPILER_MAJOR__ + (3 <= __NVCOMPILER_MINOR__) \
: (defined __GNUC__ ? 4 < __GNUC__ + (9 <= __GNUC_MINOR__) \
: (!defined __xlC__ && !defined __PGI \
&& defined __STDC_VERSION__ \
&& 201112 <= __STDC_VERSION__)))))))
# define HAVE_C11__ATOMIC 1
# else
# define HAVE_C11__ATOMIC 0