You can use the
/Wp64 compiler switch to detect 64-bit portability issues in your source code. This switch is available in 32-bit compilation. In a project's Property Pages, this switch is set under Configuration PropertiesC/C++
Detect 64-bit Portability Issues. In the .vcproj file, it appears as the
Detect64BitPortabilityProblems entry. This switch produces warnings such as the following:
C4267: conversion from ‘size_t’ to ‘int’, possible loss of data C4311: pointer truncation from ‘char *’ to ‘long’ C4312: conversion from ‘int’ to ‘HMENU’ of greater size
Note: Some of these warnings, such as C4267, appear only if the warning level is set to 3.