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]

Re: [PATCH] Unify tree/RTL dump file handling (4/5)


-  if (snprintf (dump_id, sizeof (dump_id), ".t%02d", phase) < 0)
-    dump_id[0] = '\0';
+  if (dfi->num >= 0 && dfi->num < 100)
+    {
+      *p++ = '.';
+      if (dfi->flags & TDF_TREE)
+        *p++ = 't';
+
+      *p++ = '0' + (dfi->num / 10);
+      *p++ = '0' + (dfi->num % 10);
+    }


Why?

Ehm, I don't remember. I guess you prefer


  if (dfi->num < 0
      || snprintf (dump_id, sizeof (dump_id), ".%s%02d",
		   (dfi->flags & TDF_TREE) ? "t" : "", dfi->num) < 0)
    dump_id[0] = '\0';

Ok with this change?

Paolo



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