At risk of flogging a dead horse, I consider the best answer to the question
how may I disable floating point?
to be:
Don't have float or double anywhere in your source code (EDIT: addition prompted by Helios)... or any other source code or libraries you're using.
That's it. If you want your code to NOT use floating point, that's how you do it. If there was a switch that told your compiler not to use floating point values, what should it do when it finds you using a floating point value in your source? Should it just refuse to compile?
If you want to NOT use floating point, then your code should contain no float, no double, and no numbers that aren't integers.
You could put
1 2
|
#define float DONT_USE_FLOAT
#define double DONT_USE_DOUBLE
|
in a header and then your code wouldn't compile if it contained
float
or
double
, but you would still have the risk of something like
auto = 0.01
in your code.
If you want your code to not contain float, double, or numbers that aren't integers, don't type them.