Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHmmm... the code altera added to gcc to default FP constants to 'float' is trully borked.
The option is normally selectable as -f[no-]single-precision-constant. However, rather than set this when the -mcustom-fpu-cfg options is seen, it is done at the end of option processing so cannot be turned off from the command line. Worse still, the generation of fp custom instructions can be enabled by a pragma - this will also force single precision constants from then on! Seems tempting to rebuild the compiler with the assignment "flag_single_precision_constant = 1;" moved into the argument saving code (if not deleted completely).