Decouple automatically setting the _WIN32
macro when the -fms-extensions
compiler argument is specified
#13188
Labels
_WIN32
macro when the -fms-extensions
compiler argument is specified
#13188
Feature Request
Hey, happy new year :)
As the title suggests, I'd love a way to stop the
_WIN32
macro from being automatically defined when the-fms-extensions
compiler argument is specified. I'm currently working on the MsQuic repository, which supports multiple different platforms (e.g. Windows, Linux, MacOS), and it uses some features that aren't native to clang c17 such as compounded anonymous structs (seen here and used here). You can fix this problem by adding-fms-extensions
to the compiler arguments, which implicitly defines_WIN32
. I’m working on MsQuic for Linux, so I getcannot open source file "windows.h”
errors as a consequence. Leaving-fms-extensions
out also doesn’t work, as then the compounded anonymous structs aren’t recognized anymore and generate errors themselves.Similar issues can be found in #2432 and #2363, but it seems as if nobody has had exactly the one I'm facing now. Adding
-U_WIN32
to the compiler arguments also doesn't seem to work.c_cpp_properties.json
The text was updated successfully, but these errors were encountered: