New submission from Alexander Riccio: This issue is related to Issue25847.
Compiling at /W4 is generally a good idea. It's an industry best practice, and even though I don't expect disagreement, I'll throw in a few coding standard links: https://www.securecoding.cert.org/confluence/display/c/MSC00-C.+Compile+cleanly+at+high+warning+levels https://books.google.com/books?id=pDsFCAAAQBAJ&pg=PA557&lpg=PA557&dq=compile+at+highest+warning+level&source=bl&ots=RlKoHFuuWW&sig=mcz-wqdpf3MhiyGZSYKFvpTmd9A&hl=en&sa=X&ved=0ahUKEwjkhN2Rh9_JAhXIth4KHTTbCiMQ6AEIgwEwEQ#v=onepage&q=compile%20at%20highest%20warning%20level&f=false http://programmers.stackexchange.com/questions/232626/is-it-a-good-practice-to-choose-the-highest-warning-level-in-c-programming http://ptgmedia.pearsoncmg.com/images/0321113586/items/sutter_item1.pdf ...so I was surprised to discover that the Windows build of CPython compiles at /W3! Bumping it up to /W4 produces ~9,000 warnings (up from ~20). The patch that I'll include with this issue (first iteration) bumps the warning level up to /W4, and I've disabled warnings that (appear) aren't useful. That suppresses ~8,000 of those warnings. The patch isn't quite yet perfect, as Visual Studio made changes that I didn't ask for, such as: - <ClCompile Include="..\PC\bdist_wininst\extract.c"> + <ClCompile Include="extract.c"> ...but that's about it. I had to use `hg diff -w`, because Visual Studio also decided to change the spacing in all of the .vcxproj files. ---------- messages: 256494 nosy: Alexander Riccio priority: normal severity: normal status: open title: CPython on Windows builds with /W3, not /W4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25878> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com