+2026-05-06 Bruno Haible <bruno@clisp.org>
+
+ regex: Fix compilation error with MSVC 2022.
+ * lib/cdefs.h (__restrict_arr): On MSVC, ignore __STDC_VERSION__.
+ * lib/regex.h (_Restrict_arr_): Likewise.
+
2026-05-06 Bruno Haible <bruno@clisp.org>
localeinfo: now LGPLv2+
# ifdef __GNUC__
# define __restrict_arr /* Not supported in old GCC. */
# else
-# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L \
+ && !defined _MSC_VER)
# define __restrict_arr restrict
# else
/* Some other non-C99 compiler. */
array_name[restrict]
use glibc's __restrict_arr if available.
Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
- Other ISO C99 compilers support it as well. */
+ Other ISO C99 compilers support it as well, except for MSVC. */
#ifndef _Restrict_arr_
# ifdef __restrict_arr
# define _Restrict_arr_ __restrict_arr
# else
-# if ((199901L <= __STDC_VERSION__ \
- || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
- || __clang_major__ >= 3) \
- && !defined __cplusplus)
+# if (((199901L <= __STDC_VERSION__ && !defined _MSC_VER) \
+ || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ || __clang_major__ >= 3) \
+ && !defined __cplusplus)
# define _Restrict_arr_ _Restrict_
# else
# define _Restrict_arr_