http://www.codeguru.com/forum/showthread.php?t=431298
This problem arises when A 64-bit pointer was truncated to a 32-bit int or 32-bit long.
This warning is only issued when /Wp64 is used.
From MSDN
See /Wp64
Also, Have a look Rules for Using Pointers.
This problem arises when A 64-bit pointer was truncated to a 32-bit int or 32-bit long.
This warning is only issued when /Wp64 is used.
From MSDN
Quote:
Error Message 'variable' : pointer truncation from 'type' to 'type' This warning detects 64-bit portability issues. For example, if code is compiled on a 64-bit platform, the value of a pointer (64 bits) will be truncated if it is assigned to an int (32 bits). |
See /Wp64
Quote:
Detects 64-bit portability problems on types that are also marked with the __w64 keyword. /Wp64 /Wp64 is off by default in the Visual C++ 32-bit compiler and on by default 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:
To set this compiler option in the Visual Studio development environment
|
Also, Have a look Rules for Using Pointers.
Quote:
Rules for Using Pointers Porting your code to compile for both 32- and 64-bit Microsoft® Windows® is straightforward. You need only follow a few simple rules about casting pointers, and use the new data types in your code. The rules for pointer manipulation are as follows.
|
