X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftimevar.c;h=1b5d2443c1903413f40c255e46a4b543007baccf;hb=5d4b6e9c06cae8242813f303f804f31222500c65;hp=776f575eb6927991e81c8e034f5d83ed04046d4a;hpb=60b8c5b34ab84501de6a513517a9e78e3e2c4d00;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/timevar.c b/gcc/timevar.c index 776f575eb69..1b5d2443c19 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -1,5 +1,5 @@ /* Timing variables for measuring compiler performance. - Copyright (C) 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. Contributed by Alex Samuel This file is part of GCC. @@ -80,7 +80,7 @@ struct tms #else #ifdef HAVE_GETRUSAGE # if defined HAVE_DECL_GETRUSAGE && !HAVE_DECL_GETRUSAGE - extern int getrusage PARAMS ((int, struct rusage *)); + extern int getrusage (int, struct rusage *); # endif # define USE_GETRUSAGE # define HAVE_USER_TIME @@ -88,7 +88,7 @@ struct tms #else #ifdef HAVE_CLOCK # if defined HAVE_DECL_CLOCK && !HAVE_DECL_CLOCK - extern clock_t clock PARAMS ((void)); + extern clock_t clock (void); # endif # define USE_CLOCK # define HAVE_USER_TIME @@ -226,7 +226,7 @@ timevar_init (void) timevar_enable = true; /* Zero all elapsed times. */ - memset ((void *) timevars, 0, sizeof (timevars)); + memset (timevars, 0, sizeof (timevars)); /* Initialize the names of timing variables. */ #define DEFTIMEVAR(identifier__, name__) \ @@ -286,8 +286,7 @@ timevar_push (timevar_id_t timevar) unused_stack_instances = unused_stack_instances->next; } else - context = (struct timevar_stack_def *) - xmalloc (sizeof (struct timevar_stack_def)); + context = xmalloc (sizeof (struct timevar_stack_def)); /* Fill it in and put it on the stack. */ context->timevar = tv; @@ -499,6 +498,11 @@ timevar_print (FILE *fp) fprintf (fp, "%7.2f\n", total->wall); #endif +#ifdef ENABLE_CHECKING + fprintf (fp, "Extra diagnostic checks enabled; compiler may run slowly.\n"); + fprintf (fp, "Configure with --disable-checking to disable checks.\n"); +#endif + #endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) || defined (HAVE_WALL_TIME) */ }