diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 00:40:27 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-10 00:40:27 +0000 |
commit | 50053f1f0dc3896342dee4ac6d2e44d9e41a83a3 (patch) | |
tree | 8f54e1ef2239c0f774753809917af5a7545e56f4 /libgo/runtime | |
parent | 60755fa3a9c5e8e899e16e7fc18d2eead39dcc00 (diff) | |
download | gcc-50053f1f0dc3896342dee4ac6d2e44d9e41a83a3.tar.gz |
runtime: Use __builtin_{inf,nan} rather than INFINITY/NAN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/go-matherr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/runtime/go-matherr.c b/libgo/runtime/go-matherr.c index 786f3169d6a..d620ba08bad 100644 --- a/libgo/runtime/go-matherr.c +++ b/libgo/runtime/go-matherr.c @@ -35,7 +35,7 @@ matherr (struct exception* e) n = e->name; if (__builtin_strcmp (n, "acos") == 0 || __builtin_strcmp (n, "asin") == 0) - e->retval = NAN; + e->retval = __builtin_nan (""); else if (__builtin_strcmp (n, "atan2") == 0) { if (e->arg1 == 0 && e->arg2 == 0) @@ -53,11 +53,11 @@ matherr (struct exception* e) } else if (__builtin_strcmp (n, "log") == 0 || __builtin_strcmp (n, "log10") == 0) - e->retval = NAN; + e->retval = __builtin_nan (""); else if (__builtin_strcmp (n, "pow") == 0) { if (e->arg1 < 0) - e->retval = NAN; + e->retval = __builtin_nan (""); else if (e->arg1 == 0 && e->arg2 == 0) e->retval = 1.0; else if (e->arg1 == 0 && e->arg2 < 0) @@ -65,9 +65,9 @@ matherr (struct exception* e) double i; if (modf (e->arg2, &i) == 0 && ((int64_t) i & 1) == 1) - e->retval = copysign (INFINITY, e->arg1); + e->retval = copysign (__builtin_inf (), e->arg1); else - e->retval = INFINITY; + e->retval = __builtin_inf (); } else return 0; @@ -75,7 +75,7 @@ matherr (struct exception* e) else if (__builtin_strcmp (n, "sqrt") == 0) { if (e->arg1 < 0) - e->retval = NAN; + e->retval = __builtin_nan (""); else return 0; } |