On Tue, 24 Jun 2025, Pali Rohár wrote:

The issues encountered by both the Clang and GCC builds are:

../testcases/t_ansi_io.c: In function 'main':
../testcases/t_ansi_io.c:11:10: fatal error: _mingw_print_push.h: No such
file or directory
   11 | #include <_mingw_print_push.h>

(This header was removed in 2018 in
70860d945e6be713af352ee62820bccb653589c2.)

Simple removal of those includes should be enough for the test purposes.

Ok, sure.

../testcases/t_trycatch.cpp:3:18: error: ISO C++17 does not allow dynamic
exception specifications
    3 | void foo (int d) throw (int)
      |                  ^~~~~

Too new C++ version for that test.
https://en.cppreference.com/w/cpp/language/except_spec.html

But I'm not sure what the test wanted to do.

I presume it just wanted to say that the function can throw an int - it's probably not central to the test itself. I posted a patch to remove this bit, and it was approved so I pushed this already.



Additionally, a UCRT build hits this error:

D:/a/_temp/msys64/gcc-mingw/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
testcases/tstmain_sys_xxx-tstmain_sys_xxx.o: in function `main':
D:\a\mingw-w64\mingw-w64\mingw-w64-crt\build/../testcases/tstmain_sys_xxx.c:13:(.text.startup+0xc):
undefined reference to `__imp__sys_errlist'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:27717: testcases/tstmain_sys_xxx.exe] Error 1

_sys_errlist as a macro is available in stdlib.h for all platforms.

This change (untested) could fix it:

diff --git a/mingw-w64-crt/testcases/tstmain_sys_xxx.c 
b/mingw-w64-crt/testcases/tstmain_sys_xxx.c
index 9af48233e833..42d2d48fe181 100644
--- a/mingw-w64-crt/testcases/tstmain_sys_xxx.c
+++ b/mingw-w64-crt/testcases/tstmain_sys_xxx.c
@@ -4,8 +4,7 @@
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#include <stdio.h>
-
-_CRTIMP char *_sys_errlist[];
+#include <stdlib.h>

int main(int argc, char **argv)
{

This does indeed seem to fix things, thanks! I'll send a patch with that change, with your name on it.

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to