I have seen it mentioned many times that Python extension modules on Windows must be built with MSVC. It is also mentioned here:
https://docs.python.org/3/extending/windows.html
Windows Python is built in Microsoft Visual C++; using other compilers may or may not work (though Borland seems to). The rest of this section is MSVC++ specific.
I am looking to gain a technical understanding of why this is necessary. What specific things can potentially go wrong when using MinGW-w64? Under what circumstances will things go wrong? Does it matter if the module is written in C or C++? I am looking for a starting point for further research, a high-level overview or best of all: references.
Note that I am not very familiar with development on Windows.
My motivation for asking this question is to understand how big a risk one is taking by compiling with MinGW when things appear to work. Some dependencies may be particularly troublesome to compile with MSVC, but easy to get working with MSYS / MinGW.