onSun, 17 Jun 2012 16:00:13 -0700 Paul Eggert wrote
On 06/17/2012 03:41 PM, Rich Felker wrote:
No program I know of reads long double directly from binary files.
'od -tfL' does.
it was already discussed that "GNU od" does, but it can be easily fixed there.
its not the job of the libc to make broken code happy.
i dont think its a good idea to make thousands of correct programs slower, just
that GNU guys dont have to fix one program.
I'm sure there are others. It's pretty
common to save binary data into files and restore it later.
there's no problem in saving a correct float into a file and restore it.
floats generated in a correct program will have a correct float representation,
and thus not invoke UB when restoring the value.
--JS