Previously it would only accept a string as a GCC version if it had either two components and no suffix, or three components with an optional suffix.
Debian and ubuntu provided mingw compilers have lib/gcc/target entries like "5.3-posix" and "5.3-win32". This doesn't try to make any specific preference between them (other than lexical sorting of the suffix).