This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix missing newline in timevar_print()
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Fix missing newline in timevar_print()
- From: Ira Ruben <ira at apple dot com>
- Date: Fri, 28 Sep 2001 16:29:08 -0700
Below is a trivial patch to a minor problem I just found in timevar.c
(might as well report/fix 'em as I find 'em). In timevar.c, When
HAVE_TIMES is not defined then HAVE_WALL_TIME is not defined. If
HAVE_WALL_TIME is not defined then timevar_print() doesn't output a
newline at the end of it's display. So I just moved the newline out
from under the #ifdef's.
2001-09-28 Ira Ruben <ira@apple.com>
Make sure newline is always output at the end of timevar_print,
not just when HAVE_WALL_TIME is set.
* (timevar_print) Move '\n' to it's own putc.
Index: timevar.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/timevar.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 timevar.c
*** timevar.c 2001/08/22 14:35:48 1.17
--- timevar.c 2001/09/28 22:17:33
*************** timevar_print (fp)
*** 502,509 ****
fprintf (fp, "%7.2f ", total->sys);
#endif
#ifdef HAVE_WALL_TIME
! fprintf (fp, "%7.2f\n", total->wall);
#endif
#endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME)
|| defined (HAVE_WALL_TIME) */
--- 502,510 ----
fprintf (fp, "%7.2f ", total->sys);
#endif
#ifdef HAVE_WALL_TIME
! fprintf (fp, "%7.2f", total->wall);
#endif
+ putc ('\n', fp);
#endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME)
|| defined (HAVE_WALL_TIME) */