Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edward Diener - 02 Aug 2006 14:48 GMT
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.
Jochen Kalmbach [MVP] - 02 Aug 2006 14:58 GMT
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
Edward Diener - 02 Aug 2006 17:01 GMT
> Hi Edward!
>> I am getting the above warning when compiling a line in a file which
[quoted text clipped - 6 lines]
>
> This is ON by default for new VC2005 projects...

Woops, you're right. Evidently it is on by default in VS2003 also. Thanks !
Bronek Kozicki - 02 Aug 2006 15:03 GMT
> 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.

do you have /Wp64 compiler option set?

http://msdn.microsoft.com/library/en-us/vccore/html/vchowWp64Detect64BitPortabil
ityProblems.asp


B.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.