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]

Re: Avoiding overflow in printing time


Richard

Richard Kenner wrote:
> 
> This uses floating-point to calculate percentages of time.  That's the
> way it was originally and I have no idea why it was changed to int,
> which will overflow on almost all machines.  long helps on 64-bit machines,
> but that's it.
> 

There are a few other uses of some of these XXX_time variables which you've missed.

parse_time and varconst_time are used in gcc/cp/decl2.c and declared as "extern int"
gc-time is used in gcc/gc_page.c and gc_simple.c and declared as "extern int".

All the other XXXX_time variables are only accessed in toplev.c

I think parse_time, varconst_time, and gc_time should be defined in toplev.h and
all the other XXXX_time variables become static.


Graham

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