3 ms·
I also tested MSVC vs ClangCL recently, because someone requested MSVC support, and I have no Windows machine. mingw cross worked fine for several years. on app
by rurban 4y ago
I also tested MSVC vs ClangCL recently, because someone requested MSVC support, and I have no Windows machine. mingw cross worked fine for several years. on apple and linux. So I installed clangcl and cross-compiled the project on linux to windows via clangcl, fixed all missing compat pieces (not much, because MS got much better recently, mostly adding some _ prefixes to std functions), and then tried a native MSVC CI (Github Actions and appveyor).
clangcl indeed caught a lot of problems, but not all. msvc still deviated more than with chrome. The clangcl/msvc wrong size reports were very good!
Here are the additional MSVC fixes I had to add, over clangcl:
VS2019 specific fixes, __VA_ARGS__, __attribute__, suppress warnings
* __VA_ARGS__ macro support (illegal ...)
* __attribute__ only with __GCC__
* suppress C4101 uninitialized recount warnings, and strcpy
insecure warnings.
* no proper const var support
(with the even weirder error: cannot allocate an array of constant
size)
* much stricter typecasts (silly cl compiler)
* strict dllexport/dllimport decls: fix various omissions
clangcl is not error compatible to msvc, msvc errors much more.
While I was there: tcc was fine, for chibicc I had to file some PR's with large files, and pcc is currently broken, some tricky cpp regressions, which I couldn't fix.