Weird warning when using gcroot 
Author Message
 Weird warning when using gcroot

[warning]
warning C4244: 'argument' : conversion from 'intptr_t' to 'int', possible
loss of data while compiling class-template member function
'gcroot::~gcroot(void)'
[/warning]

Nish (confused)



Fri, 07 Jan 2005 15:53:10 GMT  
 Weird warning when using gcroot
Hello Nish,

This is a mismatch between the way the GCHandle class is defined and the
way C++ implements the -Wp64 warnings.   The /Wp64 option detects 64-bit
portability problems on types that are also marked with the __w64 keyword.
I suggest you try disabling the /Wp64 option by the following steps:

1.      Right click the project and in the Solution Explorer select Project ->
Properties
2.      Select Configuration Properties -> C/C++ -> General in the left panel
3.      Set Detect 64-Bit Portability Issues to No in the right Panel

For more information about Detect 64-Bit Portability Issues please see the
links below:

/Wp64 (Detect 64-Bit Portability Issues)
http://msdn.microsoft.com/library/en-us/vccore/html/vchowWp64Detect64...
abilityProblems.asp

Compiler Warning (levels 3 and 4) C4244
http://msdn.microsoft.com/library/en-us/vccore/html/C4244.asp

__w64
http://msdn.microsoft.com/library/en-us/vclang/html/vclrf__w64.asp

I hope this information is helpful.

Best regards,

Lion Shi, MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------

    Subject: Weird warning when using gcroot
    Date: Mon, 22 Jul 2002 13:23:10 +0530
    Lines: 9
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

    Newsgroups: microsoft.public.dotnet.languages.vc
    NNTP-Posting-Host: 203.200.144.114
    Path: cpmsftngxa08!tkmsftngp01!tkmsftngp13
    Xref: cpmsftngxa08 microsoft.public.dotnet.languages.vc:12193
    X-Tomcat-NG: microsoft.public.dotnet.languages.vc

    [warning]
    warning C4244: 'argument' : conversion from 'intptr_t' to 'int',
possible
    loss of data while compiling class-template member function
    'gcroot::~gcroot(void)'
    [/warning]

    Nish (confused)



Sat, 08 Jan 2005 22:11:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Warning C4244 with gcroot<>

2. weird, weird and really weird?

3. Weird C Compile Warning

4. WARNING! std:string Weird Behaviour Found

5. Really weird C warning

6. A weird warning

7. Weird Compile Warning

8. Looking into gcroot contents while debugging

9. gcroot questions

10. gcroot safety, a race?

11. std::sort gcroot / INTERNAL COMPILER ERROR

12. How To ? - gcroot

 

 
Powered by phpBB® Forum Software