On 07/30/2012 01:38 PM, Richard Sandiford wrote: > > ...unfortunately, it doesn't prevent the use floating-point operations. > That's why it's such a bad option. The only difference from the compiler > proper's point of view between -msoft-float and -mno-float is that they > define different preprocessor macros. > > The onus is instead on the programmer to avoid writing anything that > might tempt the compiler into using floating-point operations. If the > user gets it wrong, they get (at best) a link-time error rather than a > compile-time error. > > I think we should document it that way. E.g. something like: > > @item -mno-float > @opindex mno-float > Equivalent to @option{-msoft-float}, but asserts that the user is > trying to avoid all floating-point operations. This option is presently > supported only by some bare-metal MIPS configurations, where it selects > a special set of libraries that lack all floating-point support > (including, for example, the floating-point @code{printf} formats). > If code compiled with @code{-mno-float} accidentally contains > floating-point operations, it is likely to suffer a link-time > or run-time failure. > > but you're better at the wordsmithing than I am. OK, I've gone with a slightly tweaked version of your wording. > Perhaps we should document the __mips_no_float preprocessor macro too, > since that's how things like printf() know that they don't need the > floating-point stuff. Hmmm, I don't think that's necessary, at least as part of this patch; we don't document the related __mips_hard_float or __mips_soft_float preprocessor definitions, either. > The mips.h part is OK though, thanks. Feel free to apply it separately > if that's more convenient than keeping the patch together. I've checked in the attached version of the patch. Thanks for the speedy review! :-) -Sandra 2012-07-30 Sandra Loosemore Julian Brown gcc/ * doc/invoke.texi (MIPS Options): Document -mno-float. * config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): Make it know about -mno-float.