public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1877] doc: Clarify FENV_ACCESS pragma semantics WRT `-ftrapping-math'
@ 2022-07-28 13:20 Maciej W. Rozycki
  0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2022-07-28 13:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e32ca426242f0e3c650f3122342792ad42255511

commit r13-1877-ge32ca426242f0e3c650f3122342792ad42255511
Author: Maciej W. Rozycki <macro@embecosm.com>
Date:   Thu Jul 28 14:04:33 2022 +0100

    doc: Clarify FENV_ACCESS pragma semantics WRT `-ftrapping-math'
    
    Our documentation indicates that it is the `-frounding-math' invocation
    option that controls whether we respect what the FENV_ACCESS pragma
    would imply, should we implement it, regarding the floating point
    environment.  It is only a part of the picture however, because the
    `-ftrapping-math' invocation option also affects how we handle said
    environment.  Clarify that in the description of both options then, as
    well as the FENV_ACCESS pragma itself.
    
            gcc/
            * doc/implement-c.texi (Floating point implementation): Mention
            `-fno-trapping-math' in the context of FENV_ACCESS pragma.
            * doc/invoke.texi (Optimize Options): Clarify FENV_ACCESS pragma
            implication in the descriptions of `-fno-trapping-math' and
            `-frounding-math'.

Diff:
---
 gcc/doc/implement-c.texi | 3 ++-
 gcc/doc/invoke.texi      | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi
index 93b8ddadd11..c2088ffa777 100644
--- a/gcc/doc/implement-c.texi
+++ b/gcc/doc/implement-c.texi
@@ -339,7 +339,8 @@ This is subject to change.
 7.6.1).}
 
 This pragma is not implemented, but the default is to ``off'' unless
-@option{-frounding-math} is used in which case it is ``on''.
+@option{-frounding-math} is used and @option{-fno-trapping-math} is not
+in which case it is ``on''.
 
 @item
 @cite{Additional floating-point exceptions, rounding modes, environments,
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index fa23fbeaaaa..fd7edd1938d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -13674,6 +13674,11 @@ math functions.
 
 The default is @option{-ftrapping-math}.
 
+Future versions of GCC may provide finer control of this setting
+using C99's @code{FENV_ACCESS} pragma.  This command-line option
+will be used along with @option{-frounding-math} to specify the
+default state for @code{FENV_ACCESS}.
+
 @item -frounding-math
 @opindex frounding-math
 Disable transformations and optimizations that assume default floating-point
@@ -13692,7 +13697,8 @@ This option is experimental and does not currently guarantee to
 disable all GCC optimizations that are affected by rounding mode.
 Future versions of GCC may provide finer control of this setting
 using C99's @code{FENV_ACCESS} pragma.  This command-line option
-will be used to specify the default state for @code{FENV_ACCESS}.
+will be used along with @option{-ftrapping-math} to specify the
+default state for @code{FENV_ACCESS}.
 
 @item -fsignaling-nans
 @opindex fsignaling-nans


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-28 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 13:20 [gcc r13-1877] doc: Clarify FENV_ACCESS pragma semantics WRT `-ftrapping-math' Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).