http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48878

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot
                   |                            |gnu.org

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-05-05 
12:51:49 UTC ---
"A processor is free to select any I/O rounding mode for the default mode. The
mode might correspond to UP, DOWN, ZERO, NEAREST, or COMPATIBLE; or it might be
a completely different I/O rounding mode.'

I think the standard has a funny way of telling people not to rely on default
rounding modes, i.e. be explicit if it matters. This will do it.  I am OK with
nearest

Index: write_float.def
===================================================================
--- write_float.def    (revision 173411)
+++ write_float.def    (working copy)
@@ -236,6 +236,8 @@
     if (!sign_bit)
       goto skip;
     goto updown;
+      case ROUND_PROCDEFINED:
+      case ROUND_UNSPECIFIED:
       case ROUND_NEAREST:
     /* Round compatible unless there is a tie. A tie is a 5 with
        all trailing zero's.  */
@@ -263,8 +265,6 @@
           }
       }
      /* Fall through.  */ 
-      case ROUND_PROCDEFINED:
-      case ROUND_UNSPECIFIED:
       case ROUND_COMPATIBLE:
     rchar = '5';
     goto do_rnd;

Reply via email to