From: Jeff Law <jeffreyalaw@gmail.com>
To: Matthias Kretz <m.kretz@gsi.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c-family: Add more predefined macros for math flags
Date: Sun, 19 Sep 2021 11:19:33 -0600 [thread overview]
Message-ID: <92b7655d-64a4-6784-1f69-be51ad522f14@gmail.com> (raw)
In-Reply-To: <1720040.QemTDgPxUG@excalibur>
On 6/30/2021 2:59 AM, Matthias Kretz wrote:
> Library code, especially in headers, sometimes needs to know how the
> compiler interprets / optimizes floating-point types and operations.
> This information can be used for additional optimizations or for
> ensuring correctness. This change makes -freciprocal-math,
> -fno-signed-zeros, -fno-trapping-math, -fassociative-math, and
> -frounding-math report their state via corresponding pre-defined macros.
>
> Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/associative-math-1.c: New test.
> * gcc.dg/associative-math-2.c: New test.
> * gcc.dg/no-signed-zeros-1.c: New test.
> * gcc.dg/no-signed-zeros-2.c: New test.
> * gcc.dg/no-trapping-math-1.c: New test.
> * gcc.dg/no-trapping-math-2.c: New test.
> * gcc.dg/reciprocal-math-1.c: New test.
> * gcc.dg/reciprocal-math-2.c: New test.
> * gcc.dg/rounding-math-1.c: New test.
> * gcc.dg/rounding-math-2.c: New test.
>
> gcc/c-family/ChangeLog:
>
> * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
> undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
> __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
> __ROUNDING_MATH__ according to the new optimization flags.
>
> gcc/ChangeLog:
>
> * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
> Define __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
> __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
> __ROUNDING_MATH__ according to their corresponding flags.
> * doc/cpp.texi: Document __RECIPROCAL_MATH__,
> __NO_SIGNED_ZEROS__, __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__,
> and __ROUNDING_MATH__.
OK. Sorry about the long wait.
jeff
prev parent reply other threads:[~2021-09-19 17:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 8:59 Matthias Kretz
2021-07-07 7:46 ` ping: " Matthias Kretz
2021-07-14 7:32 ` ping-2: " Matthias Kretz
2021-07-14 12:42 ` H.J. Lu
2021-07-16 6:16 ` Matthias Kretz
2021-07-27 14:51 ` ping-3: " Matthias Kretz
2021-09-19 17:19 ` Jeff Law [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92b7655d-64a4-6784-1f69-be51ad522f14@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=m.kretz@gsi.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).