This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alexander Riccio
Recipients Alexander Riccio
Date 2015-12-16.00:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450224755.83.0.682115702996.issue25878@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-12-16 00:12:35Alexander Ricciosetrecipients: + Alexander Riccio
2015-12-16 00:12:35Alexander Ricciosetmessageid: <1450224755.83.0.682115702996.issue25878@psf.upfronthosting.co.za>
2015-12-16 00:12:35Alexander Ricciolinkissue25878 messages
2015-12-16 00:12:35Alexander Ricciocreate