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]

patch applied: print sign of infinity


Regression tested on i686-pc-linux-gnu. Applied as obvious.
2006-09-02  J"orn Rennecke  <joern.rennecke@st.com>

	* print-tree.c (print_node_brief, print_node): Print sign of Inf.

Index: print-tree.c
===================================================================
/usr/bin/diff -p -d -F^( -u -L print-tree.c	(revision 116678) -L print-tree.c	(working copy) .svn/text-base/print-tree.c.svn-base print-tree.c
--- print-tree.c	(revision 116678)
+++ print-tree.c	(working copy)
@@ -138,7 +138,7 @@ print_node_brief (FILE *file, const char
 
       d = TREE_REAL_CST (node);
       if (REAL_VALUE_ISINF (d))
-	fprintf (file, " Inf");
+	fprintf (file,  REAL_VALUE_NEGATIVE (d) ? " -Inf" : " Inf");
       else if (REAL_VALUE_ISNAN (d))
 	fprintf (file, " Nan");
       else
@@ -709,7 +709,7 @@ print_node (FILE *file, const char *pref
 
 	    d = TREE_REAL_CST (node);
 	    if (REAL_VALUE_ISINF (d))
-	      fprintf (file, " Inf");
+	      fprintf (file,  REAL_VALUE_NEGATIVE (d) ? " -Inf" : " Inf");
 	    else if (REAL_VALUE_ISNAN (d))
 	      fprintf (file, " Nan");
 	    else

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