https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91092
--- Comment #2 from Florian Weimer <fw at gcc dot gnu.org> --- Current util-linux is an example: $ ./configure […] checking wchar_t support... yes […] $ ./configure CC="gcc -Werror=implicit-function-declaration" […] configure: WARNING: wchar_t support not found; not building widechar […] configure.ac has this: AC_ARG_ENABLE([widechar], AS_HELP_STRING([--disable-widechar], [do not compile wide character support]), [], [enable_widechar=check] ) UL_BUILD_INIT([widechar]) UL_REQUIRES_COMPILE([widechar], [[ #include <wchar.h> #include <wctype.h> #include <stdio.h> ]], [[ wchar_t wc; wint_t w; w = fgetwc(stdin); if (w == WEOF) exit(1); wc = w; fputwc(wc,stdout); ]], [wchar_t support]) #include <stdlib.h> is missing for the exit function. This is still a large task as a result, but the cost of not doing this also quite high in terms of time wasted on hunting down source code bugs the compiler has already identified successfully.