* tests/test-stdcountof-h.c (a, b, c): Define as variables on MSVC.
+2025-10-12 Bruno Haible <bruno@clisp.org>
+
+ stdcountof-h tests: Fix link error on MSVC 14 (regression 2025-06-07).
+ * tests/test-stdcountof-h.c (a, b, c): Define as variables on MSVC.
+
2025-10-10 Collin Funk <collin.funk1@gmail.com>
getline tests: Add a test for the glibc bug.
return test_exit_status;
}
+
+/* A definition of the variables a, b, c is not required by ISO C, because
+ these identifiers are only used as part of 'sizeof' expressions whose
+ results are integer expressions. See ISO C 23 ยง 6.9.1.(5). However,
+ MSVC 14 generates actual references to these variables. We thus need
+ to define these variables; otherwise we get link errors. */
+#if defined _MSC_VER && !defined __clang__
+int a, b, c;
+#endif