Avoiding overflow in printing time
grahams
grahams@rcp.co.uk
Sat Apr 15 10:20:00 GMT 2000
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
More information about the Gcc-patches
mailing list