This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]