g++ 3.4.2 (32 bit) on Solaris: I am passing doubles in binary format.
So I receive the binary representation for a double (500000 in this particular case, which is 0x41 0x1e 0x84 0x80 0x00 0x00 0x00 0x00) If I reinterpret_cast the pointer to const double * then dereference it I get a Bus Error (core dumped). The workaround (that works) is to copy the buffer into a double, i.e. take a double, reinterpret_cast its address to unsigned char * and copy the buffer. That works, no crash. It worked fine until I compiled in release mode with O3 optimisation setting. -ffloat-store flag makes no difference. The downside of the workaround is it means one more buffer copy. Still I will use this for now. Is this a known bug (as far as I'm aware it is not undefined behaviour)? Is it fixed in later versions (but I don't have a later version). _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus