Are we using new tools different from the "msys2 project" that we've been using for a while? (that gcc shows version 7.1.0):
[MINGW32] d:\mamedev\msys64\src\mame_src>gcc --version
gcc (Rev2, Built by MSYS2 project) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.