Am Montag, dem 18.09.2023 um 14:43 +0300 schrieb Alexander Monakov:
> On Mon, 18 Sep 2023, Jakub Jelinek wrote:
> 
> > 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.

I think the default should be off - at least for code that does
not contain the pragma anywhere. 

> > 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.
> 
> When implementing -ffp-contract=standard I looked into implementing the
> pragma (in a precise manner) and I didn't get the impression it would be
> hard to implement for C. But I was somewhat discouraged by the lack of
> front-end maintainers reaction to the patch implementing the =standard,
> so I didn't pursue that.
> 
> The hardest part would be popping the pragma state when leaving a block,
> which didn't seem difficult (at least for C).

It is fairly restricted where it can appear, it essentially operates
on the level of compound statements (!= blocks). 

Martin

Reply via email to