Weird warning when using gcroot
-
warning C4244: 'argument' : conversion from 'intptr_t' to 'int', possible loss of data while compiling class-template member function 'gcroot::~gcroot(void)'
Nish :confused:
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
warning C4244: 'argument' : conversion from 'intptr_t' to 'int', possible loss of data while compiling class-template member function 'gcroot::~gcroot(void)'
Nish :confused:
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
How are you using gcroot? James "Java is free - and worth every penny." - Christian Graus
-
warning C4244: 'argument' : conversion from 'intptr_t' to 'int', possible loss of data while compiling class-template member function 'gcroot::~gcroot(void)'
Nish :confused:
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
What is weird in it? It is very valid warning. It says that for 64 bit code your casting would create problems. What is the line of code? Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
-
What is weird in it? It is very valid warning. It says that for 64 bit code your casting would create problems. What is the line of code? Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
Hello Rama See my reply to James T J Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
How are you using gcroot? James "Java is free - and worth every penny." - Christian Graus
Hello Rama/James It's a well know bug it seems. It happens when you use gcroot in an MFC application compiled with /clr. See this reply from a Microsoft guy in reply to a similar question that got asked in the dotnet mailing list. From: "Mark Hall (VC++)" markhall@MICROSOFT.COM Subject: Re: gcroot template with warning C4244? This is a mismatch between the way the GCHandle class is defined and the way C++ implements the -Wp64 warnings. In short, intptr_t and System::IntPtr were not recognized as fully compatible. This will be fixed in the next release.
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]