/Wp64 (Detect 64-Bit Portability Issues)

Detects 64-bit portability problems on types that are also marked with the __w64 keyword.



Important noteImportant Note:

The /Wp64 compiler option and __w64 keyword are deprecated and will be removed in a future version of the compiler. If you use the /Wp64 compiler option on the command line, the compiler issues Command-Line Warning D9035. Instead of using this option and keyword to detect 64-bit portability issues, use a Visual C++ compiler that targets a 64-bit platform. For more information, see 64-Bit Programming with Visual C++.

By default, the /Wp64 compiler option is off in the Visual C++ 32-bit compiler and on in the Visual C++ 64-bit compiler.

Variables of the following types are tested on a 32-bit operating system as if they were being used on a 64-bit operating system:

  • int

  • long

  • pointer

If you regularly compile your application with a 64-bit compiler, you may want to disable /Wp64 in your 32-bit compilations, as the 64-bit compiler will detect all issues. For more information about targeting a Windows 64-bit operating system, see 64-Bit Programming with Visual C++.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the General property page.

  4. Modify the Detect 64-bit Portability Issues property.

To set this compiler option programmatically

See Also


Compiler Options

Setting Compiler Options

Other Resources

64-Bit Programming with Visual C++