[Issue 16105] `is` fails for init value of struct with float

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 31 05:05:57 PDT 2016


--- Comment #2 from Don <clugdbug at yahoo.com.au> ---
This isn't a codegen bug per se, but is rather a design bug.

It happens because float.init is a signalling NaN. We should change it to be a
quiet NaN. Using signalling NaNs seemed like a good idea at the time but it
turns out that the hardware support for it just isn't good enough.
Even on x86, Intel and AMD CPUs behave differently. And on other CPUs it is
even worse.
The situation at present is, the intended behaviour is a bit broken on some
platforms, and totally broken on others. It is impossible to fix it.

It is entirely my fault. When Walter released the backend I did this signalling
NaN experiment that I had always wanted to do. I think it was my first compiler
patch ever. It was a mistake. A failed experiment. We need to roll it back.


More information about the Digitalmars-d-bugs mailing list