https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66471
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Just as a quick observation from looking at host-mingw32.c: #include "config.h" #include "system.h" #include "coretypes.h" #include "hosthooks.h" #include "hosthooks-def.h" #include "diagnostic.h" #define WIN32_LEAN_AND_MEAN /* Not so important if we have windows.h.gch. */ #include <windows.h> #include <stdlib.h> stdlib.h is already included from system.h and system headers should be included _before_ (well, in...) system.h (or at least directly after it). Probably doesn't fix the issue though.