Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Weird warning when using gcroot

Weird warning when using gcroot

Scheduled Pinned Locked Moved Managed C++/CLI
htmlcomhosting
5 Posts 3 Posters 16 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nish Nishant
    wrote on last edited by
    #1

    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]

    J R 2 Replies Last reply
    0
    • N Nish Nishant

      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]

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      How are you using gcroot? James "Java is free - and worth every penny." - Christian Graus

      N 1 Reply Last reply
      0
      • N Nish Nishant

        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]

        R Offline
        R Offline
        Rama Krishna Vavilala
        wrote on last edited by
        #3

        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

        N 1 Reply Last reply
        0
        • R Rama Krishna Vavilala

          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

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          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]

          1 Reply Last reply
          0
          • J James T Johnson

            How are you using gcroot? James "Java is free - and worth every penny." - Christian Graus

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #5

            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]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups