简体   繁体   English

从 32 位移植到 64 位 - 有没有 -Wp64 开关的替代方案?

[英]Porting from 32-bit to 64-bit - any alternative to -Wp64 switch?

I'm porting my 32-bit (Win32) application to 64-bit using VS 2012. I read on MSDN that -Wp64 switch helps with porting by generating warnings on pointer trunction et al so we can address them during the compilation phase before they become an issue at run-time.我正在使用 VS 2012 将我的 32 位(Win32)应用程序移植到 64 位。我在 MSDN 上读到 -Wp64 开关通过在指针截断等上生成警告来帮助移植,因此我们可以在编译阶段在它们出现之前解决它们成为运行时的问题。 However, MSDN as well as the compiler output (in the output window) says that this option has been deprecated and in fact won't even be supported by later Visual Studio releases.但是,MSDN 以及编译器输出(在输出窗口中)表示此选项已被弃用,事实上,以后的 Visual Studio 版本甚至不支持此选项。 I want to know if there's a better alternative to -Wp64 that will be supported by future Visual Studio versions too.我想知道未来的 Visual Studio 版本是否也支持 -Wp64 的更好替代方案。

This article is to answer some questions related to safe port of C/C++ code on 64-bit systems.本文旨在回答一些与64位系统上C/C++代码安全移植相关的问题。 The article is written as an answer to the topic often discussed on forums and related to the use of /Wp64 key.这篇文章是对论坛上经常讨论的主题的回答,并且与 /Wp64 密钥的使用相关。

Try PVS-Studio 64-bit Rules Set for detect 64-bit issues (support Visual Studio 2010-2017).尝试使用 PVS-Studio 64 位规则集来检测 64 位问题(支持 Visual Studio 2010-2017)。 Also I am recommend read this : the course will consider all steps in creating a new safe 64-bit application, or migrating the existing 32-bit code to a 64-bit system.此外,我建议阅读此内容:本课程将考虑创建新的安全 64 位应用程序或将现有 32 位代码迁移到 64 位系统的所有步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM