public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Glisse <glisse@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/glisse/heads/fenv)] Handle dg-require-effective-target fenv in C++ Date: Thu, 6 Aug 2020 16:11:53 +0000 (GMT) [thread overview] Message-ID: <20200806161153.CA6953857C6C@sourceware.org> (raw) https://gcc.gnu.org/g:2b20eff5d40e170b59ca90ff31c050f4a57a802e commit 2b20eff5d40e170b59ca90ff31c050f4a57a802e Author: Marc Glisse <marc.glisse@inria.fr> Date: Thu Aug 6 18:11:30 2020 +0200 Handle dg-require-effective-target fenv in C++ Diff: --- gcc/testsuite/lib/target-supports.exp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index e79015b4d54..c81637eb2ec 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -9554,9 +9554,18 @@ proc check_effective_target_avr_tiny { } { # Return 1 if <fenv.h> is available. proc check_effective_target_fenv {} { + set opts "" + if [check_effective_target_c] { + append opts "-std=gnu99" + } + if [check_effective_target_c++] { + if { ![check_effective_target_c++11] } { + return 0 + } + } return [check_no_compiler_messages fenv object { #include <fenv.h> - } [add_options_for_ieee "-std=gnu99"]] + } [add_options_for_ieee "$opts"]] } # Return 1 if <fenv.h> is available with all the standard IEEE @@ -9565,6 +9574,15 @@ proc check_effective_target_fenv {} { # exceptions, those need to be specified in the testcases.) proc check_effective_target_fenv_exceptions {} { + set opts "" + if [check_effective_target_c] { + append opts "-std=gnu99" + } + if [check_effective_target_c++] { + if { ![check_effective_target_c++11] } { + return 0 + } + } return [check_runtime fenv_exceptions { #include <fenv.h> #include <stdlib.h> @@ -9593,7 +9611,7 @@ proc check_effective_target_fenv_exceptions {} { else abort (); } - } [add_options_for_ieee "-std=gnu99"]] + } [add_options_for_ieee "$opts"]] } # Return 1 if -fexceptions is supported.
reply other threads:[~2020-08-06 16:11 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200806161153.CA6953857C6C@sourceware.org \ --to=glisse@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).