warning C4244: '=' : conversion from 'intptr_t' to 'long', possibleloss of data in VC++ 7.1

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

I am getting the above warning when compiling a line in a file which
assigns an 'intptr_t' result to a 'long' variable. I do not see how
intptr_t can possibly be larger than a long unless intptr_t is a 64 bit
value and I know I am not compiling for 64 bit Windows.
 
Hi Edward!
I am getting the above warning when compiling a line in a file which
assigns an 'intptr_t' result to a 'long' variable. I do not see how
intptr_t can possibly be larger than a long unless intptr_t is a 64 bit
value and I know I am not compiling for 64 bit Windows.

Maybe you have enabled /Wp64 compiler Flag
http://msdn2.microsoft.com/en-us/library/yt4xw8fh.aspx

This is ON by default for new VC2005 projects...

You can disable it in your project settings under "C/C++|General|Detect
64-bit Portability Issues"

Greetings
Jochen
 
Back
Top