April 3, 2026
9:23 a.m.
Recent (at least >= 15.2) GCC changes enabled -Wdiscarded-qualifier by default. Fixing these warnings allows for building with -Werror again. Also, recent GCC versions switched to use C23 by default. This causes glibc to define wcschr, wcsrchr and wcspbrk as macros in their version of wchar.h. Redefining those also leads to a warning, which gets converted to an error with -Werror. The second commit in this MR detects this case and `#undefs` the macros. -- v2: build: Allow building with C23 and GLIBC build: Fix -Wdiscarded-qualifier warnings https://gitlab.winehq.org/wine/wine/-/merge_requests/10540