Concerns regarding the -ffp-contract=fast default
Jakub Jelinek
jakub@redhat.com
Mon Sep 18 11:32:35 GMT 2023
On Mon, Sep 18, 2023 at 01:26:54PM +0200, Martin Uecker wrote:
> > I think that changing the default to =standard without -ffast-math is
> > reasonable.
> > IIRC the standard allows such default if it's indicated, so it doesn't require
> > =off anywhere.
>
> The C standard requires a pragma to turn control it on and off,
> which GCC does not support. The default is then implementation
> defined.
Perhaps we should add some initial hammer approach for the pragma, like
if you ever use the pragma to turn it somewhere off, it is turned off
globally, or ditto per function. Might be far easier than trying to
make it precise that contraction is allowed in this expression and not in
this subexpression of that etc. Of course, making it precise is the
ultimate goal.
Jakub
More information about the Gcc
mailing list