D-Programming-Language/dmd — pull request #615 by alexrp (2012-01-11 11:33:03+00:00)
Title: Define NoFloat version when -nofloat is passed; HardFloat otherwise

The idea with these changes is to make it easy to write code that depends on whether we're compiling with or without floating point support.

The idea is to standardize the three version identifiers, NoFloat, HardFloat, and SoftFloat. This is not just to support the -nofloat switch, but to allow compilers to just not support floating point at all on some architecture/platform configurations.

So, in the general case (not just for DMD):

* NoFloat shall be defined if -nofloat is passed or the configuration being compiled for simply does not support floating point.
* If NoFloat is defined, neither HardFloat nor SoftFloat shall be defined.
* If the configuration being compiled for supports hardware-assisted floating point computations, HardFloat shall be defined. Otherwise, SoftFloat shall be defined (which indicates that software-assisted floating point is being used).
* HardFloat and SoftFloat shall not be defined at the same time.