Having found https://devblogs.microsoft.com/cppblog/broken-warnings-theory/ we tried it out in the hope of focussing our /Analyze builds on finding problems in our own code. We used c /analyze /analyze:stacksize131072 /analyze:WX- /experimental:external /external:anglebrackets /external:W0
in our compiler invocations but found this triggered lots of warnings=errors from Windows Kit header files. e.g.
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpc.h(65): error C2220: warning treated as error - no 'object' file generated
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpc.h(65): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpc.h(223): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(47): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(3300): warning C4103: alignment changed after including header, may be due to missing #pragma pack(pop)
How can we avoid these errors? They directly oppose the whole point of the 'external' options.