public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/glisse/heads/fenv)] Handle dg-require-effective-target fenv in C++
@ 2020-08-06 16:11 Marc Glisse
0 siblings, 0 replies; only message in thread
From: Marc Glisse @ 2020-08-06 16:11 UTC (permalink / raw)
To: gcc-cvs
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-06 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 16:11 [gcc(refs/users/glisse/heads/fenv)] Handle dg-require-effective-target fenv in C++ Marc Glisse
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).