diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-10-08 01:37:45 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2019-10-08 01:37:45 +0100 |
commit | fbb2a6dcf8abbd1a605544597442e3d67984a455 (patch) | |
tree | 24ae9f7f7cca0794b54fdcc58088dce8cb05ac5e /gcc/c-family | |
parent | b11df8983de352246b68c1485121d4aa8f26a5bb (diff) | |
download | gcc-fbb2a6dcf8abbd1a605544597442e3d67984a455.zip gcc-fbb2a6dcf8abbd1a605544597442e3d67984a455.tar.gz gcc-fbb2a6dcf8abbd1a605544597442e3d67984a455.tar.bz2 |
Make C2X imply -fno-fp-int-builtin-inexact.
Since TS 18661-1 has been integrated into C2X, this patch makes C2X
imply -fno-fp-int-builtin-inexact.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
gcc:
* doc/invoke.texi (-ffp-int-builtin-inexact): Document
-fno-fp-int-builtin-inexact default for C2X.
gcc/c-family:
* c-opts.c (c_common_post_options): Set
-fno-fp-int-builtin-inexact for C2X.
gcc/testsuite:
* gcc.dg/torture/builtin-fp-int-inexact-c2x.c: New test.
From-SVN: r276686
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-opts.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 7deaff0..93077ff 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Joseph Myers <joseph@codesourcery.com> + + * c-opts.c (c_common_post_options): Set + -fno-fp-int-builtin-inexact for C2X. + 2019-10-05 Jakub Jelinek <jakub@redhat.com> PR c++/91369 - Implement P0784R7: constexpr new diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 949d96a..4ad24bd 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -826,6 +826,12 @@ c_common_post_options (const char **pfilename) else flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_C11; + /* C2X Annex F does not permit certain built-in functions to raise + "inexact". */ + if (flag_isoc2x + && !global_options_set.x_flag_fp_int_builtin_inexact) + flag_fp_int_builtin_inexact = 0; + /* By default we use C99 inline semantics in GNU99 or C99 mode. C99 inline semantics are not supported in GNU89 or C89 mode. */ if (flag_gnu89_inline == -1) |