I've often considered building a gcc variant that deliberately breaks a bunch of the sloppy assumptions people make - like that all pointers are the same size, or that *(foo **)&bar_ptr == (foo *)bar_ptr.... i think you better explain this last one to us peons... as usual, post and realise! something like this would be valid i believe: *(foo **)&(foo *)bar_ptr == (foo *)bar_ptr