On 11/13/14 14:01, Joseph Myers wrote:
If you want to accept as much code as possible and only give errors if
floating-point code would actually be generated - for example, if you want
to be able to #include <stdlib.h> with glibc (where it defines an inline
version of atof) - then you need to look at GIMPLE after optimization,
taking into account which functions will actually be output so as to
ignore unused inline functions.
When presented with related issues in the past (FP instructions showing
up in kernel code where we had declared them strictly verboten), we've
added options to disable the entire FP register file on the target.
So the only time we got a compile-time error was if some FP bits
survived all the way through to register allocation.
The obvious downside is it has to be done on a per-target basis and
there's no standardized set of options.
jeff