Patch: bug in fr30.c:fr30_print_operand w/CONST_DOUBLE
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Sat Sep 7 21:10:00 GMT 2002
When building a cross-compiler to fr30-unknown-elf, I get this
warning:
> config/fr30/fr30.c:560: warning: double format, realvaluetype arg (arg 3)
The problem is that a REAL_VALUE_TYPE is being passed to fprintf.
I'm not sure if this is the right fix, and if it is, whether
specifying 8 digits is correct (but that's what the fprintf was trying
to do.) I do know that its broken the way it is currently.
Ok to install?
Thanks,
--Kaveh
2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fr30.c (fr30_print_operand): Fix bug in output of CONST_DOUBLE.
diff -rup orig/egcc-CVS20020905/gcc/config/fr30/fr30.c egcc-CVS20020905/gcc/config/fr30/fr30.c
--- orig/egcc-CVS20020905/gcc/config/fr30/fr30.c Mon Jul 15 22:57:25 2002
+++ egcc-CVS20020905/gcc/config/fr30/fr30.c Sat Sep 7 23:49:11 2002
@@ -555,9 +555,11 @@ fr30_print_operand (file, x, code)
else
{
REAL_VALUE_TYPE d;
+ char str[30];
REAL_VALUE_FROM_CONST_DOUBLE (d, x);
- fprintf (file, "%.8f", d);
+ REAL_VALUE_TO_DECIMAL (d, str, 8);
+ fputs (str, file);
}
return;
More information about the Gcc-patches
mailing list