On Tue, 13 Sep 2016, Tamar Christina wrote: > On 12/09/16 23:41, Joseph Myers wrote: > > Are you making endianness assumptions - specifically, does the > > reinterpretation as an integer require that WORDS_BIG_ENDIAN and > > FLOAT_WORDS_BIG_ENDIAN are the same? If so, I think that's OK (in that > > the only target where they aren't the same seems to be pdp11 which doesn't > > use IEEE formats), but probably the code should check explicitly. > > > No, if I understood the question correctly then this should be ok, > since I always access the float as an integer of equivalent precision. > So a 64bit float will be addressed as a 64bit int.
My point is that there are theoretically systems where the order of words in a 64-bit float is not the same as the order of words in a 64-bit integer. Though it may be the case in practice that no such targets in GCC use IEEE formats (and that pdp11 is the only target without all of BYTES_BIG_ENDIAN, WORDS_BIG_ENDIAN and FLOAT_WORDS_BIG_ENDIAN the same). -- Joseph S. Myers jos...@codesourcery.com