Please take a look at http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1278172720
I've been struggling (mostly brute force trial and error) to fix some code in eeprom.h, deep in the bowels of arduino. The code is conditionally included if the processor is a 2560. So although it is in the current system source it doesn't get compiled. My hunch is that it works on another compiler, but not gcc.
Perhaps part of what leaves me so confused about trying to understand casts is that the rules seem to be interpreted differently in different compilers and I find varying explanations of C++ casts on the web. Anyway the one case I worked out a sort of solution for seems awkward and wordy and therefore seems inappropriate for a fundamental part of the system. There must be some way to get the compiler to agree to "copy anything", which is what the original code seems quite clearly to tell it to do.
Unfortunately I think the problem is way more pervasive than the 2 instances I posted, but it seems to me that if I can write the syntax elegantly once, I will understand how to do it over and over.