Multiple Abstract Base Classes, Offset & Weird

Nathan Sidwell nathan@codesourcery.com
Thu Sep 11 14:37:00 GMT 2003


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@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc-help mailing list