Re: Multiple Abstract Base Classes, Offset & Weird

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jacob Smith wrote:
GCC-Help -

I have a question about pointer dereference. Here's a mock-up of the situation:
*(base_1*)GetHashedValue(/*hash code*/); } /* a safe cast */

*(base_2*)GetHashedValue(/*hash code*/); } /* a safe cast */
those comments are most likely incorrect. I suspect you are putting
'concrete *'s in the hash table. If you cast a class pointer to a void
pointer, the only safe cast is to cast it back to the exact same class
type.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux