This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Avoid explicit use of machine modes (3/n) real.c
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Sep 2003 14:56:12 -0700
- Subject: Avoid explicit use of machine modes (3/n) real.c
Ignoring the various uses of 'real_format_for_mode[mode - QFmode]'
which are going to be dealt with later, the only use of a mode
enumerator in real.c other than VOIDmode is in real_sqrt, where it is
completely unnecessary - real_nan just calls get_canonical_qnan.
zw
* real.c (real_sqrt): Use get_canonical_qnan directly.
===================================================================
Index: real.c
--- real.c 22 Sep 2003 05:46:51 -0000 1.126
+++ real.c 29 Sep 2003 21:59:01 -0000
@@ -4459,8 +4459,7 @@ real_sqrt (REAL_VALUE_TYPE *r, enum mach
/* Negative arguments return NaN. */
if (real_isneg (x))
{
- /* Mode is ignored for canonical NaN. */
- real_nan (r, "", 1, SFmode);
+ get_canonical_qnan (r, 0);
return false;
}